]> 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:13:03 +0000 (13:13 -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
(cherry picked from commit 38c81328e91884f71af175a115dfdb423d8f4910)

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 2a52de06cfd2fc8af4ec0a0729651d873a21ac2b..4972872c912ca96b993740618b3db22e19788d47 100644 (file)
@@ -776,10 +776,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(