summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/mysql/reflection.py
diff options
context:
space:
mode:
authorLele Long <schemacs@gmail.com>2016-12-03 13:10:07 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2017-01-17 10:23:07 -0500
commitbd6ba3ac8274381e578c8e6c8018a7878fe94208 (patch)
treefd69163fc90a9b27cef0bd3ae3d23f66a0cd9fde /lib/sqlalchemy/dialects/mysql/reflection.py
parent46828cc157a48d73352a3a910798b705aa23f0d5 (diff)
downloadsqlalchemy-bd6ba3ac8274381e578c8e6c8018a7878fe94208.tar.gz
Parse (but don't record) COMMENT portion of MySQL table key
The MySQL dialect now will not warn when a reflected column has a "COMMENT" keyword on it, but note however the comment is not yet reflected; this is on the roadmap for a future release. Pull request courtesy Lele Long. Fixes: #3867 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/324 Change-Id: I869e29aba6766d0eda1e59af09a3e8e3748a3942
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/reflection.py')
-rw-r--r--lib/sqlalchemy/dialects/mysql/reflection.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/reflection.py b/lib/sqlalchemy/dialects/mysql/reflection.py
index d020fb296..f5f09b80b 100644
--- a/lib/sqlalchemy/dialects/mysql/reflection.py
+++ b/lib/sqlalchemy/dialects/mysql/reflection.py
@@ -359,6 +359,7 @@ class MySQLTableDefinitionParser(object):
r'(?: +USING +(?P<using_post>\S+))?'
r'(?: +KEY_BLOCK_SIZE *[ =]? *(?P<keyblock>\S+))?'
r'(?: +WITH PARSER +(?P<parser>\S+))?'
+ r'(?: +COMMENT +(?P<comment>(\x27\x27|\x27([^\x27])*?\x27)+))?'
r',?$'
% quotes
)