diff options
author | Hanno Schlichting <hanno@hannosch.eu> | 2017-02-28 11:10:57 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-02-28 11:11:58 -0500 |
commit | b2820e190f14a39730da0c1f2ccae6aa32a455f0 (patch) | |
tree | a6a07c8eef1321a9a7ccadc9dec9b2e5e166bc08 | |
parent | fe1cabb88a060378c839bda53992882f67b525c7 (diff) | |
download | sqlalchemy-b2820e190f14a39730da0c1f2ccae6aa32a455f0.tar.gz |
Add new reserved words for MySQL 8.0 (beta).
Based on https://dev.mysql.com/doc/refman/8.0/en/keywords.html#table-keywords-new-8.0
Change-Id: I128c93520e57331e0ec4d40b0c0e752bf9b982d9
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/346
-rw-r--r-- | doc/build/changelog/changelog_11.rst | 6 | ||||
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/base.py | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/doc/build/changelog/changelog_11.rst b/doc/build/changelog/changelog_11.rst index 0095f9c29..14115514f 100644 --- a/doc/build/changelog/changelog_11.rst +++ b/doc/build/changelog/changelog_11.rst @@ -21,6 +21,12 @@ .. changelog:: :version: 1.1.6 + .. change:: + :tags: bug, mysql + + Added new MySQL 8.0 reserved words to the MySQL dialect for proper + quoting. Pull request courtesy Hanno Schlichting. + .. change:: 3915 :tags: bug, orm :tickets: 3915 diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index 8b0d00a63..822e93282 100644 --- a/lib/sqlalchemy/dialects/mysql/base.py +++ b/lib/sqlalchemy/dialects/mysql/base.py @@ -676,6 +676,9 @@ RESERVED_WORDS = set( 'generated', 'optimizer_costs', 'stored', 'virtual', # 5.7 + 'admin', 'except', 'grouping', 'of', 'persist', 'recursive', + 'role', # 8.0 + ]) AUTOCOMMIT_RE = re.compile( |