Ticket #953 (closed defect: wontfix)

Opened 4 years ago

Last modified 4 years ago

Dependency on information_schema in MySQL backend

Reported by: kevin@… Owned by: andrew
Priority: minor Milestone: 1.0
Component: databaseapi Version: 0.7.3
Keywords: Cc:


MySQL4 doesn't have information_schema. Both 7.3 and hg tip use information_schema in figuring out constraints, which come into play when you try to run any migration that e.g. affects a foreign key.

Additionally, the error MySQL throws is (unsurprisingly) rather unhelpful:

SELECT command denied to user ....... for table 'key_column_usage'

The ideal solution would of course be to use fallbacks like Django itself (for instance, the introspection code has the information_schema SELECT is in a try...catch, with a fallback to SHOW CREATE TABLE). That might be more effort than it's worth to support an edge case in a fairly old database, though.

Failing that, a reasonable fallback would be to at least detect this condition and give the user a readable explanation (basically the same try...catch but without the SHOW CREATE TABLE parsing) - at least that would help understand what's happening (and then probably do the migration by hand and fake it, or implement some other workaround).

Change History

comment:1 Changed 4 years ago by andrew

  • Status changed from new to closed
  • Resolution set to wontfix
  • Milestone set to 1.0

I'm afraid that in this case I'm going to have to say that South just won't support MySQL4 - it's so rarely used in production and requires so much extra work it's just not worth it.

Note: See TracTickets for help on using tickets.