diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-26 08:12:52 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-26 08:12:52 +0000 |
commit | a1f10f8d39404d9bae42a64efaf505fa12f34c1a (patch) | |
tree | 9eb894268f2a145aa9d42b1726a555ab1359810f /tests/dialects/test_mysql.py | |
parent | Adding upstream version 25.8.1. (diff) | |
download | sqlglot-a1f10f8d39404d9bae42a64efaf505fa12f34c1a.tar.xz sqlglot-a1f10f8d39404d9bae42a64efaf505fa12f34c1a.zip |
Adding upstream version 25.16.1.upstream/25.16.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_mysql.py')
-rw-r--r-- | tests/dialects/test_mysql.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/dialects/test_mysql.py b/tests/dialects/test_mysql.py index 65b4c4a..c598cb5 100644 --- a/tests/dialects/test_mysql.py +++ b/tests/dialects/test_mysql.py @@ -24,6 +24,18 @@ class TestMySQL(Validator): self.validate_identity("ALTER TABLE t ADD INDEX `i` (`c`)") self.validate_identity("ALTER TABLE t ADD UNIQUE `i` (`c`)") self.validate_identity("ALTER TABLE test_table MODIFY COLUMN test_column LONGTEXT") + self.validate_identity("ALTER VIEW v AS SELECT a, b, c, d FROM foo") + self.validate_identity("ALTER VIEW v AS SELECT * FROM foo WHERE c > 100") + self.validate_identity( + "ALTER ALGORITHM = MERGE VIEW v AS SELECT * FROM foo", check_command_warning=True + ) + self.validate_identity( + "ALTER DEFINER = 'admin'@'localhost' VIEW v AS SELECT * FROM foo", + check_command_warning=True, + ) + self.validate_identity( + "ALTER SQL SECURITY = DEFINER VIEW v AS SELECT * FROM foo", check_command_warning=True + ) self.validate_identity( "INSERT INTO things (a, b) VALUES (1, 2) AS new_data ON DUPLICATE KEY UPDATE id = LAST_INSERT_ID(id), a = new_data.a, b = new_data.b" ) |