diff options
author | Kevin Kirsche <kevin.kirsche@one.verizon.com> | 2021-10-19 17:22:03 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-10-20 12:57:48 -0400 |
commit | ba278a16f3e0c54bb9db8dfb37b3f9b776b7f2e5 (patch) | |
tree | 627f2c0de57511ac1888bb314ac503f670282ef0 /lib/sqlalchemy/dialects/mysql/mariadb.py | |
parent | 4bad8b5a7f48d571bd1e96908299134830ff462f (diff) | |
download | sqlalchemy-ba278a16f3e0c54bb9db8dfb37b3f9b776b7f2e5.tar.gz |
fix: Update reserved words list of MySQL / MariaDB dialect
Reorganized the list of reserved words into two separate lists, one for
MySQL and one for MariaDB, so that these diverging sets of words can be
managed more accurately; adjusted the MySQL/MariaDB dialect to switch among
these lists based on either explicitly configured or
server-version-detected "MySQL" or "MariaDB" backend. Added all current
reserved words through MySQL 8 and current MariaDB versions including
recently added keywords like "lead" . Pull request courtesy Kevin Kirsche.
1. Move reserved words to it's own file.
2. Add missing reserved words from https://mariadb.com/kb/en/reserved-words/
* Note: this only adds MariaDB though links to MySQL, it also does not
include the reserved words for Oracle mode, as listed in the link.
Fixes: #7167
Supercedes: #7197
Closes: #7207
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/7207
Pull-request-sha: 5a682e331069520ccad9e6bf3cc5e4a77a889ef0
Change-Id: Ib25be8148568899f56b5c9b42d4f530ade8a04e3
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/mariadb.py')
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/mariadb.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/mariadb.py b/lib/sqlalchemy/dialects/mysql/mariadb.py index 8ebde462b..568c3f0cf 100644 --- a/lib/sqlalchemy/dialects/mysql/mariadb.py +++ b/lib/sqlalchemy/dialects/mysql/mariadb.py @@ -1,3 +1,4 @@ +from .base import MariaDBIdentifierPreparer from .base import MySQLDialect @@ -5,6 +6,7 @@ class MariaDBDialect(MySQLDialect): is_mariadb = True supports_statement_cache = True name = "mariadb" + preparer = MariaDBIdentifierPreparer def loader(driver): |