#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)
Change History (7)
by , 18 years ago
Attachment: | django.core.management.diff added |
---|
comment:1 by , 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 , 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 , 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 , 18 years ago
Attachment: | category.sql added |
---|
Patch to exclude empty statements from sqlinitialdata