#27142: makemigrations fails on special database connections
----------------------------+--------------------------------------
     Reporter:  gerricom    |                    Owner:  nobody
         Type:  Bug         |                   Status:  new
    Component:  Migrations  |                  Version:  1.10
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Unreviewed
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+--------------------------------------

Comment (by gerricom):

 Replying to [comment:1 claudep]:
 > Could you please provide the full traceback of the error? Did you test
 the patch proposed for #27110, did it help in your use case?

 This is the full traceback:


 {{{
 Traceback (most recent call last):
   File "manage.py", line 10, in <module>
     execute_from_command_line(sys.argv)
   File "/usr/local/lib/python2.7/site-
 packages/django/core/management/__init__.py", line 367, in
 execute_from_command_line
     utility.execute()
   File "/usr/local/lib/python2.7/site-
 packages/django/core/management/__init__.py", line 359, in execute
     self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/usr/local/lib/python2.7/site-
 packages/django/core/management/base.py", line 305, in run_from_argv
     self.execute(*args, **cmd_options)
   File "/usr/local/lib/python2.7/site-
 packages/django/core/management/base.py", line 356, in execute
     output = self.handle(*args, **options)
   File "/usr/local/lib/python2.7/site-
 packages/django/core/management/commands/makemigrations.py", line 100, in
 handle
     loader.check_consistent_history(connection)
   File "/usr/local/lib/python2.7/site-
 packages/django/db/migrations/loader.py", line 278, in
 check_consistent_history
     applied = recorder.applied_migrations()
   File "/usr/local/lib/python2.7/site-
 packages/django/db/migrations/recorder.py", line 65, in applied_migrations
     self.ensure_schema()
   File "/usr/local/lib/python2.7/site-
 packages/django/db/migrations/recorder.py", line 52, in ensure_schema
     if self.Migration._meta.db_table in
 self.connection.introspection.table_names(self.connection.cursor()):
   File "/usr/local/lib/python2.7/site-
 packages/django/db/backends/base/introspection.py", line 57, in
 table_names
     return get_names(cursor)
   File "/usr/local/lib/python2.7/site-
 packages/django/db/backends/base/introspection.py", line 52, in get_names
     return sorted(ti.name for ti in self.get_table_list(cursor)
   File "/usr/local/lib/python2.7/site-
 packages/django/db/backends/mysql/introspection.py", line 53, in
 get_table_list
     cursor.execute("SHOW FULL TABLES")
   File "/usr/local/lib/python2.7/site-
 packages/django/db/backends/utils.py", line 79, in execute
     return super(CursorDebugWrapper, self).execute(sql, params)
   File "/usr/local/lib/python2.7/site-
 packages/django/db/backends/utils.py", line 64, in execute
     return self.cursor.execute(sql, params)
   File "/usr/local/lib/python2.7/site-packages/django/db/utils.py", line
 94, in __exit__
     six.reraise(dj_exc_type, dj_exc_value, traceback)
   File "/usr/local/lib/python2.7/site-
 packages/django/db/backends/utils.py", line 62, in execute
     return self.cursor.execute(sql)
   File "/usr/local/lib/python2.7/site-
 packages/django/db/backends/mysql/base.py", line 112, in execute
     return self.cursor.execute(query, args)
   File "/usr/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line
 226, in execute
     self.errorhandler(self, exc, value)
   File "/usr/local/lib/python2.7/site-packages/MySQLdb/connections.py",
 line 36, in defaulterrorhandler
     raise errorvalue
 django.db.utils.ProgrammingError: (1064, "sphinxql: syntax error,
 unexpected IDENT, expecting VARIABLES near 'FULL TABLES'")
 }}}

 The patch in #27110 did not help in this case as the error raises in the
 database introspection.

--
Ticket URL: <https://code.djangoproject.com/ticket/27142#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.aa104e89a61c34ae2cb035bbff4f1719%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to