-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[mysql] add test to cover the datatype GeomCollection that's synonymo… #822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
wuchong
merged 1 commit into
apache:master
from
luoyuxia:cover_geomcollection_for_mysql8
Jan 21, 2022
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 87 additions & 0 deletions
87
flink-connector-mysql-cdc/src/test/resources/ddl/column_type_test_mysql8.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
-- Licensed to the Apache Software Foundation (ASF) under one | ||
-- or more contributor license agreements. See the NOTICE file | ||
-- distributed with this work for additional information | ||
-- regarding copyright ownership. The ASF licenses this file | ||
-- to you under the Apache License, Version 2.0 (the | ||
-- "License"); you may not use this file except in compliance | ||
-- with the License. You may obtain a copy of the License at | ||
-- http://www.apache.org/licenses/LICENSE-2.0 | ||
-- Unless required by applicable law or agreed to in writing, | ||
-- software distributed under the License is distributed on an | ||
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
-- KIND, either express or implied. See the License for the | ||
-- specific language governing permissions and limitations | ||
-- under the License. | ||
|
||
-- ---------------------------------------------------------------------------------------------------------------- | ||
-- DATABASE: column_type_test | ||
-- ---------------------------------------------------------------------------------------------------------------- | ||
|
||
CREATE TABLE full_types ( | ||
id INT AUTO_INCREMENT NOT NULL, | ||
tiny_c TINYINT, | ||
tiny_un_c TINYINT UNSIGNED, | ||
small_c SMALLINT, | ||
small_un_c SMALLINT UNSIGNED, | ||
medium_c MEDIUMINT, | ||
medium_un_c MEDIUMINT UNSIGNED, | ||
int_c INTEGER , | ||
int_un_c INTEGER UNSIGNED, | ||
int11_c INT(11) , | ||
big_c BIGINT, | ||
big_un_c BIGINT UNSIGNED, | ||
varchar_c VARCHAR(255), | ||
char_c CHAR(3), | ||
real_c REAL, | ||
float_c FLOAT, | ||
double_c DOUBLE, | ||
decimal_c DECIMAL(8, 4), | ||
numeric_c NUMERIC(6, 0), | ||
big_decimal_c DECIMAL(65, 1), | ||
bit1_c BIT, | ||
tiny1_c TINYINT(1), | ||
boolean_c BOOLEAN, | ||
date_c DATE, | ||
time_c TIME(0), | ||
datetime3_c DATETIME(3), | ||
datetime6_c DATETIME(6), | ||
timestamp_c TIMESTAMP, | ||
file_uuid BINARY(16), | ||
bit_c BIT(64), | ||
text_c TEXT, | ||
tiny_blob_c TINYBLOB, | ||
blob_c BLOB, | ||
medium_blob_c MEDIUMBLOB, | ||
long_blob_c LONGBLOB, | ||
year_c YEAR, | ||
enum_c enum('red', 'white') default 'red', | ||
set_c SET('a', 'b'), | ||
json_c JSON, | ||
point_c POINT, | ||
geometry_c GEOMETRY, | ||
linestring_c LINESTRING, | ||
polygon_c POLYGON, | ||
multipoint_c MULTIPOINT, | ||
multiline_c MULTILINESTRING, | ||
multipolygon_c MULTIPOLYGON, | ||
geometrycollection_c GEOMCOLLECTION, | ||
PRIMARY KEY (id) | ||
) DEFAULT CHARSET=utf8; | ||
|
||
INSERT INTO full_types VALUES ( | ||
DEFAULT, 127, 255, 32767, 65535, 8388607, 16777215, 2147483647, 4294967295, 2147483647, 9223372036854775807, | ||
18446744073709551615, | ||
'Hello World', 'abc', 123.102, 123.102, 404.4443, 123.4567, 345.6, 34567892.1, 0, 1, true, | ||
'2020-07-17', '18:00:22', '2020-07-17 18:00:22.123', '2020-07-17 18:00:22.123456', '2020-07-17 18:00:22', | ||
unhex(replace('651aed08-390f-4893-b2f1-36923e7b7400','-','')), b'0000010000000100000001000000010000000100000001000000010000000100', | ||
'text',UNHEX(HEX(16)),UNHEX(HEX(16)),UNHEX(HEX(16)),UNHEX(HEX(16)), 2021, | ||
'red', 'a,b,a', '{"key1": "value1"}', | ||
ST_GeomFromText('POINT(1 1)'), | ||
ST_GeomFromText('POLYGON((1 1, 2 1, 2 2, 1 2, 1 1))'), | ||
ST_GeomFromText('LINESTRING(3 0, 3 3, 3 5)'), | ||
ST_GeomFromText('POLYGON((1 1, 2 1, 2 2, 1 2, 1 1))'), | ||
ST_GeomFromText('MULTIPOINT((1 1),(2 2))'), | ||
ST_GeomFromText('MultiLineString((1 1,2 2,3 3),(4 4,5 5))'), | ||
ST_GeomFromText('MULTIPOLYGON(((0 0, 10 0, 10 10, 0 10, 0 0)), ((5 5, 7 5, 7 7, 5 7, 5 5)))'), | ||
ST_GeomFromText('GEOMETRYCOLLECTION(POINT(10 10), POINT(30 30), LINESTRING(15 15, 20 20))') | ||
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ skip-host-cache | |
skip-name-resolve | ||
#datadir=/var/lib/mysql | ||
#socket=/var/lib/mysql/mysql.sock | ||
#secure-file-priv=/var/lib/mysql-files | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
secure-file-priv=/var/lib/mysql | ||
user=mysql | ||
|
||
# Disabling symbolic-links is recommended to prevent assorted security risks | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although
GEOMCOLLECTION
is synonymous withGEOMETRYCOLLECTION
in mysql8.0, but it still needs to useGEOMETRYCOLLECTION
when insert such data, otherwise it'll throw invalid gis data exception.