Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#2034 closed defect (fixed)

[patch] sqlinitialdata broken in mysql

Reported by: Joeboy Owned by: Adrian Holovaty
Component: Core (Other) Version: dev
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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 (2)

django.core.management.diff (527 bytes ) - added by jpellerin@… 18 years ago.
Patch to exclude empty statements from sqlinitialdata
category.sql (200 bytes ) - added by Joeboy 18 years ago.

Download all attachments as: .zip

Change History (7)

by jpellerin@…, 18 years ago

Attachment: django.core.management.diff added

Patch to exclude empty statements from sqlinitialdata

comment:1 by jpellerin@…, 18 years ago

Summary: sqlinitialdata broken in mysql[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().

comment:2 by Joeboy, 18 years ago

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 :-(

comment:3 by jpellerin@…, 18 years ago

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.

by Joeboy, 18 years ago

Attachment: category.sql added

comment:4 by Joeboy, 18 years ago

fwiw, file that errors out is attached

comment:5 by Malcolm Tredinnick, 18 years ago

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.
Back to Top