Closed
Description
Migrated issue, originally created by LiQuan (@loveiset)
My existing table created with following sql
CREATE TABLE `fx_orders_items` (
.....
FULLTEXT KEY `ix_fulltext_oi_g_name` (`oi_g_name`) /*!50100 WITH PARSER `ngram` */
) ENGINE=InnoDB AUTO_INCREMENT=100018857 DEFAULT CHARSET=utf8 COMMENT=''
when I use autoload like this
Table("fx_orders_items", metadata, autoload=True)
it throws error
C:\Python27\lib\site-packages\sqlalchemy\dialects\mysql\reflection.py:57: SAWarning: Unknown schema content: u' FULLTEXT KEY `ix_fulltext_oi_g_name` (`oi_g_name`) /*!50100 WITH PARSER `ngram` */ '
util.warn("Unknown schema content: %r" % line)
I just debug it and found the line
FULLTEXT KEY `ix_fulltext_oi_g_name` (`oi_g_name`) /*!50100 WITH PARSER `ngram` */
didn't go into any of this and return None
def _parse_constraints(self, line):
"""Parse a KEY or CONSTRAINT line.
:param line: A line of SHOW CREATE TABLE output
"""
m = self._re_key.match(line)
m = self._re_fk_constraint.match(line)
m = self._re_ck_constraint.match(line)
m = self._re_partition.match(line)
# No match.
return (None, line)
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
sqlalchemy-bot commentedon Apr 17, 2018
Michael Bayer (@zzzeek) wrote:
that's only a warning, it's not a "throw". your program can continue to work correctly with this warning.
sqlalchemy-bot commentedon Apr 17, 2018
Changes by Michael Bayer (@zzzeek):
sqlalchemy-bot commentedon Apr 17, 2018
Michael Bayer (@zzzeek) wrote:
there it is
sqlalchemy-bot commentedon Apr 17, 2018
Changes by Michael Bayer (@zzzeek):
sqlalchemy-bot commentedon Apr 17, 2018
Michael Bayer (@zzzeek) wrote:
OK this is really the bug !!
sqlalchemy-bot commentedon Apr 17, 2018
Changes by Michael Bayer (@zzzeek):
sqlalchemy-bot commentedon Apr 17, 2018
Michael Bayer (@zzzeek) wrote:
add support for the whole thing, including rendering and reflection of options:
https://gerrit.sqlalchemy.org/#/c/zzzeek/sqlalchemy/+/731
sqlalchemy-bot commentedon Apr 17, 2018
Changes by Michael Bayer (@zzzeek):
sqlalchemy-bot commentedon Apr 17, 2018
Changes by Michael Bayer (@zzzeek):
sqlalchemy-bot commentedon Apr 17, 2018
Changes by Michael Bayer (@zzzeek):
sqlalchemy-bot commentedon Apr 17, 2018
Michael Bayer (@zzzeek) wrote:
Render and reflect MySQL WITH PARSER index options
Support added for the "WITH PARSER" syntax of CREATE FULLTEXT INDEX
in MySQL, using the
mysql_with_parser
keyword argument. Reflectionis also supported, which accommodates MySQL's special comment format
for reporting on this option as well. Additionally, the "FULLTEXT" and
"SPATIAL" index prefixes are now reflected back into the
mysql_prefix
index option.
Change-Id: I0209291978125d8cee1bb5ed386d4f66578697a0
Fixes: #4219
→ 6c2a1e1
sqlalchemy-bot commentedon Apr 17, 2018
Changes by Michael Bayer (@zzzeek):
1 remaining item