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/mariadbconnector.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/mariadbconnector.py')
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/mariadbconnector.py | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/mariadbconnector.py b/lib/sqlalchemy/dialects/mysql/mariadbconnector.py index 0997abc7a..14ed11b19 100644 --- a/lib/sqlalchemy/dialects/mysql/mariadbconnector.py +++ b/lib/sqlalchemy/dialects/mysql/mariadbconnector.py @@ -32,7 +32,6 @@ import re from .base import MySQLCompiler from .base import MySQLDialect from .base import MySQLExecutionContext -from .base import MySQLIdentifierPreparer from ... import sql from ... import util @@ -51,10 +50,6 @@ class MySQLCompiler_mariadbconnector(MySQLCompiler): pass -class MySQLIdentifierPreparer_mariadbconnector(MySQLIdentifierPreparer): - pass - - class MySQLDialect_mariadbconnector(MySQLDialect): driver = "mariadbconnector" supports_statement_cache = True @@ -78,7 +73,6 @@ class MySQLDialect_mariadbconnector(MySQLDialect): default_paramstyle = "qmark" execution_ctx_cls = MySQLExecutionContext_mariadbconnector statement_compiler = MySQLCompiler_mariadbconnector - preparer = MySQLIdentifierPreparer_mariadbconnector supports_server_side_cursors = True |