Adding upstream version 26.8.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
4b797b16f0
commit
4c394df415
61 changed files with 43883 additions and 41898 deletions
|
@ -14,6 +14,7 @@ class TestMySQL(Validator):
|
|||
self.validate_identity(f"CREATE TABLE t (id {t} UNSIGNED)")
|
||||
self.validate_identity(f"CREATE TABLE t (id {t}(10) UNSIGNED)")
|
||||
|
||||
self.validate_identity("CREATE TABLE bar (abacate DOUBLE(10, 2) UNSIGNED)")
|
||||
self.validate_identity("CREATE TABLE t (id DECIMAL(20, 4) UNSIGNED)")
|
||||
self.validate_identity("CREATE TABLE foo (a BIGINT, UNIQUE (b) USING BTREE)")
|
||||
self.validate_identity("CREATE TABLE foo (id BIGINT)")
|
||||
|
@ -149,6 +150,10 @@ class TestMySQL(Validator):
|
|||
"sqlite": "CREATE TABLE x (id INTEGER NOT NULL AUTOINCREMENT PRIMARY KEY)",
|
||||
},
|
||||
)
|
||||
self.validate_identity("ALTER TABLE t ALTER INDEX i INVISIBLE")
|
||||
self.validate_identity("ALTER TABLE t ALTER INDEX i VISIBLE")
|
||||
self.validate_identity("ALTER TABLE t ALTER COLUMN c SET INVISIBLE")
|
||||
self.validate_identity("ALTER TABLE t ALTER COLUMN c SET VISIBLE")
|
||||
|
||||
def test_identity(self):
|
||||
self.validate_identity("SELECT HIGH_PRIORITY STRAIGHT_JOIN SQL_CALC_FOUND_ROWS * FROM t")
|
||||
|
@ -385,16 +390,16 @@ class TestMySQL(Validator):
|
|||
|
||||
def test_hexadecimal_literal(self):
|
||||
write_CC = {
|
||||
"bigquery": "SELECT 0xCC",
|
||||
"clickhouse": "SELECT 0xCC",
|
||||
"bigquery": "SELECT FROM_HEX('CC')",
|
||||
"clickhouse": UnsupportedError,
|
||||
"databricks": "SELECT X'CC'",
|
||||
"drill": "SELECT 204",
|
||||
"duckdb": "SELECT 204",
|
||||
"duckdb": "SELECT FROM_HEX('CC')",
|
||||
"hive": "SELECT 204",
|
||||
"mysql": "SELECT x'CC'",
|
||||
"oracle": "SELECT 204",
|
||||
"postgres": "SELECT x'CC'",
|
||||
"presto": "SELECT 204",
|
||||
"presto": "SELECT x'CC'",
|
||||
"redshift": "SELECT 204",
|
||||
"snowflake": "SELECT x'CC'",
|
||||
"spark": "SELECT X'CC'",
|
||||
|
@ -402,20 +407,20 @@ class TestMySQL(Validator):
|
|||
"starrocks": "SELECT x'CC'",
|
||||
"tableau": "SELECT 204",
|
||||
"teradata": "SELECT X'CC'",
|
||||
"trino": "SELECT X'CC'",
|
||||
"trino": "SELECT x'CC'",
|
||||
"tsql": "SELECT 0xCC",
|
||||
}
|
||||
write_CC_with_leading_zeros = {
|
||||
"bigquery": "SELECT 0x0000CC",
|
||||
"clickhouse": "SELECT 0x0000CC",
|
||||
"bigquery": "SELECT FROM_HEX('0000CC')",
|
||||
"clickhouse": UnsupportedError,
|
||||
"databricks": "SELECT X'0000CC'",
|
||||
"drill": "SELECT 204",
|
||||
"duckdb": "SELECT 204",
|
||||
"duckdb": "SELECT FROM_HEX('0000CC')",
|
||||
"hive": "SELECT 204",
|
||||
"mysql": "SELECT x'0000CC'",
|
||||
"oracle": "SELECT 204",
|
||||
"postgres": "SELECT x'0000CC'",
|
||||
"presto": "SELECT 204",
|
||||
"presto": "SELECT x'0000CC'",
|
||||
"redshift": "SELECT 204",
|
||||
"snowflake": "SELECT x'0000CC'",
|
||||
"spark": "SELECT X'0000CC'",
|
||||
|
@ -423,7 +428,7 @@ class TestMySQL(Validator):
|
|||
"starrocks": "SELECT x'0000CC'",
|
||||
"tableau": "SELECT 204",
|
||||
"teradata": "SELECT X'0000CC'",
|
||||
"trino": "SELECT X'0000CC'",
|
||||
"trino": "SELECT x'0000CC'",
|
||||
"tsql": "SELECT 0x0000CC",
|
||||
}
|
||||
|
||||
|
@ -728,6 +733,13 @@ class TestMySQL(Validator):
|
|||
},
|
||||
)
|
||||
|
||||
self.validate_all(
|
||||
"CURDATE()",
|
||||
write={
|
||||
"mysql": "CURRENT_DATE",
|
||||
"postgres": "CURRENT_DATE",
|
||||
},
|
||||
)
|
||||
self.validate_all(
|
||||
"SELECT CONCAT('11', '22')",
|
||||
read={
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue