]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Added missing keywords for MySQL dialect
authorOscar Batori <oscar@liquidata.co>
Wed, 16 Sep 2020 17:41:34 +0000 (13:41 -0400)
committerGord Thompson <gord@gordthompson.com>
Thu, 12 Nov 2020 19:55:35 +0000 (12:55 -0700)
Fixes: #5696
Add missing MySQL keywords.

### Description
Adds some missing keywords from the MySQL dialect. While it's hard to describe this as a documentation/typographical fix, there are no current test for presence of the correct keywords, nor a realistic way to implement them those tests.

### Checklist
This pull request is:

- [x] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [ ] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

Closes: #5567
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5567
Pull-request-sha: db76e7f9d3a903cb4acf0309d57a14fe69948a0f

Change-Id: Ieaef45d0214fc9052a36924bfee38df9a27f7040
(cherry picked from commit 5ef39fa2c16e293e73d8c7cee019857e081b9b52)

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

diff --git a/doc/build/changelog/unreleased_13/5696.rst b/doc/build/changelog/unreleased_13/5696.rst
new file mode 100644 (file)
index 0000000..5283cf7
--- /dev/null
@@ -0,0 +1,7 @@
+.. change::
+    :tags: mysql, sql
+    :tickets: 5696
+
+    Added missing keywords to the `RESERVED_WORDS` list for the mysql dialect:
+    action, level, mode, status, text, time.
+    Pull request courtesy Oscar Batori.
index 4505a83e6c0d8b863c3e5e5b181f080df6030943..e1aef37968c1ee5a99861ef57b1b3691d2d6955c 100644 (file)
@@ -906,7 +906,7 @@ from ...util import topological
 RESERVED_WORDS = set(
     [
         "accessible",
-        "accessible",
+        "action",
         "add",
         "admin",
         "all",
@@ -1036,6 +1036,7 @@ RESERVED_WORDS = set(
         "leading",
         "leave",
         "left",
+        "level",
         "like",
         "limit",
         "linear",
@@ -1064,6 +1065,7 @@ RESERVED_WORDS = set(
         "minute_microsecond",
         "minute_second",
         "mod",
+        "mode",
         "modifies",
         "natural",
         "no_write_to_binlog",
@@ -1147,13 +1149,16 @@ RESERVED_WORDS = set(
         "sqlwarning",
         "ssl",
         "starting",
+        "status",
         "stored",
         "straight_join",
         "system",
         "table",
         "tables",  # 4.1
         "terminated",
+        "text",
         "then",
+        "time",
         "tinyblob",
         "tinyint",
         "tinytext",