From: Oscar Batori Date: Wed, 16 Sep 2020 17:41:34 +0000 (-0400) Subject: Added missing keywords for MySQL dialect X-Git-Tag: rel_1_4_0b2~157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ef39fa2c16e293e73d8c7cee019857e081b9b52;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Added missing keywords for MySQL dialect 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: #` 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: #` 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 --- diff --git a/doc/build/changelog/unreleased_13/5696.rst b/doc/build/changelog/unreleased_13/5696.rst new file mode 100644 index 0000000000..5283cf7e4b --- /dev/null +++ b/doc/build/changelog/unreleased_13/5696.rst @@ -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. diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index 27c7b2239b..b5fb0933b4 100644 --- a/lib/sqlalchemy/dialects/mysql/base.py +++ b/lib/sqlalchemy/dialects/mysql/base.py @@ -993,7 +993,7 @@ from ...util import topological RESERVED_WORDS = set( [ "accessible", - "accessible", + "action", "add", "admin", "all", @@ -1123,6 +1123,7 @@ RESERVED_WORDS = set( "leading", "leave", "left", + "level", "like", "limit", "linear", @@ -1151,6 +1152,7 @@ RESERVED_WORDS = set( "minute_microsecond", "minute_second", "mod", + "mode", "modifies", "natural", "no_write_to_binlog", @@ -1234,13 +1236,16 @@ RESERVED_WORDS = set( "sqlwarning", "ssl", "starting", + "status", "stored", "straight_join", "system", "table", "tables", # 4.1 "terminated", + "text", "then", + "time", "tinyblob", "tinyint", "tinytext",