]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Add reserved word 'function' for MySQL
authorAlex Hall <alex.mojaki@gmail.com>
Tue, 30 Oct 2018 17:00:49 +0000 (13:00 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 30 Oct 2018 17:12:13 +0000 (13:12 -0400)
Added word ``function`` to the list of reserved words for MySQL, which is
now a keyword in MySQL 8.0

Fixes: #4348
Change-Id: Idd30acda7e99076810f65d0ee860055a18dc9193
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/481

doc/build/changelog/unreleased_12/4348.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mysql/base.py

diff --git a/doc/build/changelog/unreleased_12/4348.rst b/doc/build/changelog/unreleased_12/4348.rst
new file mode 100644 (file)
index 0000000..5b40ec6
--- /dev/null
@@ -0,0 +1,6 @@
+.. change::
+   :tags: bug, mysql
+   :tickets: 4348
+
+   Added word ``function`` to the list of reserved words for MySQL, which is
+   now a keyword in MySQL 8.0
index 07eca78bb399f00b3cfba05cd0232dcd3988e124..23e482d2bbb352fc420b65ed8f51367d3f915234 100644 (file)
@@ -814,10 +814,10 @@ RESERVED_WORDS = set(
      'generated', 'optimizer_costs', 'stored', 'virtual',  # 5.7
 
      'admin', 'cume_dist', 'empty', 'except', 'first_value', 'grouping',
-     'groups', 'json_table', 'last_value', 'nth_value', 'ntile', 'of',
-     'over', 'percent_rank', 'persist', 'persist_only', 'rank', 'recursive',
-     'role', 'row', 'rows', 'row_number', 'system', 'window', # 8.0
-
+     'function', 'groups', 'json_table', 'last_value', 'nth_value',
+     'ntile', 'of', 'over', 'percent_rank', 'persist', 'persist_only',
+     'rank', 'recursive', 'role', 'row', 'rows', 'row_number', 'system',
+     'window',  # 8.0
      ])
 
 AUTOCOMMIT_RE = re.compile(