]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
add additional "oracle mode" reserved words
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 26 Oct 2021 19:52:25 +0000 (15:52 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 26 Oct 2021 19:54:10 +0000 (15:54 -0400)
despite mariadb's docs, the word "system" must be
quoted in plain mariadb 10.5, not sure if that's
"oracle mode" but it is > 10.3.   observed keystone
tests failing on a column of this name.

Fixes: #7167
Change-Id: I153b79809e7da007bcceecec96c1340d1641f0de

lib/sqlalchemy/dialects/mysql/reserved_words.py

index fc2b13b44fe30e510ccfe39d5724f3b286c9d383..e2c39852d809aef187efb4e7cf258836452ccb19 100644 (file)
@@ -9,8 +9,8 @@
 # https://gist.github.com/kkirsche/4f31f2153ed7a3248be1ec44ca6ddbc9
 #
 # https://mariadb.com/kb/en/reserved-words/
-# includes: Reserved Words
-# excludes: Exceptions, Oracle Mode, Function Names
+# includes: Reserved Words, Oracle Mode (separate set unioned)
+# excludes: Exceptions, Function Names
 RESERVED_WORDS_MARIADB = {
     "accessible",
     "add",
@@ -261,7 +261,23 @@ RESERVED_WORDS_MARIADB = {
     "xor",
     "year_month",
     "zerofill",
-}
+}.union(
+    {
+        "body",
+        "elsif",
+        "goto",
+        "history",
+        "others",
+        "package",
+        "period",
+        "raise",
+        "rowtype",
+        "system",
+        "system_time",
+        "versioning",
+        "without",
+    }
+)
 
 # https://dev.mysql.com/doc/refman/8.0/en/keywords.html
 # https://dev.mysql.com/doc/refman/5.7/en/keywords.html