Django

Code

Ticket #2034 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

[patch] sqlinitialdata broken in mysql

Reported by: Joeboy Assigned to: adrian
Milestone: Component: Core framework
Version: SVN Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

I think [2985] broke sqlinitialdata in mysql. It seems to strip trailing semicolons, and hence errors out on hitting the next sql statement.

Attachments

django.core.management.diff (0.5 kB) - added by jpellerin@gmail.com on 05/30/06 09:46:10.
Patch to exclude empty statements from sqlinitialdata
category.sql (200 bytes) - added by Joeboy on 05/31/06 03:04:49.

Change History

05/30/06 09:46:10 changed by jpellerin@gmail.com

  • attachment django.core.management.diff added.

Patch to exclude empty statements from sqlinitialdata

05/30/06 09:47:50 changed by jpellerin@gmail.com

  • summary changed from sqlinitialdata broken in mysql to [patch] sqlinitialdata broken in mysql.

Mysql is failing when an initial data file has trailing whitespace after the last semicolon. Patch attached that removes empty statements from the list passed to output.extend().

05/30/06 11:04:12 changed by Joeboy

Thanks, but that doesn't seem to be it. I have a one-line sql file, and the trailing semicolon is the last character in it. I tried the patch in case I was missing something, but it doesn't fix the problem :-(

05/30/06 12:49:37 changed by jpellerin@gmail.com

Could you post the sql file (or a sanitized example suitable for public view) that's failing for you? I've tried with one-line and multiline files with trailing semicolons and not and I can't reproduce the error once the patch is applied.

05/31/06 03:04:49 changed by Joeboy

  • attachment category.sql added.

05/31/06 03:05:34 changed by Joeboy

fwiw, file that errors out is attached

06/20/06 03:00:45 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

(In [3178]) Fixed #2119 -- fixed problems with splitting SQL statements into separate statements. Uses a patch from eaw@woudy.org and some contributions from jpellerin@gmail.com. Also fixes #2034 and #1935.


Add/Change #2034 ([patch] sqlinitialdata broken in mysql)




Change Properties
Action