Opened 14 years ago
Closed 14 years ago
#14613 closed (invalid)
sql custom bug
Reported by: | rilldo | Owned by: | pandres |
---|---|---|---|
Component: | Core (Other) | Version: | 1.2 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
1, following sql faild, because django refuse '---' string.
INSERT INTO priority (value, isactive) VALUES ('---', 500);
the '---' string is default string for many database table. so I think this is a bug.
2, try to fix:
code file: django/core/management/sql.py
169 line: statement = re.sub(ur"--.*([\n\Z]|$)", "", statement)
modify to:
statement = re.sub(ur"\.*([\n\Z]|$)", "", statement)
hope django can accept this fix.
Change History (2)
comment:1 by , 14 years ago
Owner: | changed from | to
---|
comment:2 by , 14 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
I don't see your django code. I've tried creating objects with the '---' string in some fields and worked fine.
The line you point shouldn't be changed, '--' is an escape sequence in most db engines.