Opened 15 years ago
Closed 15 years ago
#12415 closed (duplicate)
wrong parsing of SQL comments in initial SQL data
Description ¶
Function custom_sql_for_model in core/management/sql.py incorrectly cut SQL comments - without considering to a query context. For example, function cuts end of such query:
INSERT INTO `table` (`description`) VALUES ('Come play on our boat -- On the Water');
It's because of a very simple regexp at line 187:
statement = re.sub(ur"^--.*([\n\Z]|$)", "", statement)
Note:
See TracTickets
for help on using tickets.
Dupe of #3214.