From: Hanno Schlichting Date: Tue, 28 Feb 2017 16:10:57 +0000 (-0500) Subject: Add new reserved words for MySQL 8.0 (beta). X-Git-Tag: rel_1_1_6~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2820e190f14a39730da0c1f2ccae6aa32a455f0;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git 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 --- diff --git a/doc/build/changelog/changelog_11.rst b/doc/build/changelog/changelog_11.rst index 0095f9c29f..14115514f6 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 8b0d00a63d..822e932827 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(