1
0
Fork 0

Adding upstream version 26.9.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-03-09 08:41:47 +01:00
parent 4c394df415
commit 412e82cbc6
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
43 changed files with 27039 additions and 26675 deletions

View file

@ -83,6 +83,12 @@ class TestMySQL(Validator):
self.validate_identity(
"CREATE OR REPLACE VIEW my_view AS SELECT column1 AS `boo`, column2 AS `foo` FROM my_table WHERE column3 = 'some_value' UNION SELECT q.* FROM fruits_table, JSON_TABLE(Fruits, '$[*]' COLUMNS(id VARCHAR(255) PATH '$.$id', value VARCHAR(255) PATH '$.value')) AS q",
)
self.validate_identity(
"CREATE TABLE test_table (id INT AUTO_INCREMENT, PRIMARY KEY (id) USING BTREE)"
)
self.validate_identity(
"CREATE TABLE test_table (id INT AUTO_INCREMENT, PRIMARY KEY (id) USING HASH)"
)
self.validate_identity(
"/*left*/ EXPLAIN SELECT /*hint*/ col FROM t1 /*right*/",
"/* left */ DESCRIBE /* hint */ SELECT col FROM t1 /* right */",
@ -340,6 +346,22 @@ class TestMySQL(Validator):
"tsql": "CHAR(10)",
},
)
self.validate_identity("CREATE TABLE t (foo VARBINARY(5))")
self.validate_all(
"CREATE TABLE t (foo BLOB)",
write={
"mysql": "CREATE TABLE t (foo BLOB)",
"oracle": "CREATE TABLE t (foo BLOB)",
"postgres": "CREATE TABLE t (foo BYTEA)",
"tsql": "CREATE TABLE t (foo VARBINARY)",
"sqlite": "CREATE TABLE t (foo BLOB)",
"duckdb": "CREATE TABLE t (foo VARBINARY)",
"hive": "CREATE TABLE t (foo BINARY)",
"bigquery": "CREATE TABLE t (foo BYTES)",
"redshift": "CREATE TABLE t (foo VARBYTE)",
"clickhouse": "CREATE TABLE t (foo Nullable(String))",
},
)
def test_escape(self):
self.validate_identity("""'"abc"'""")