| Bug #10828 | mysqldump produces unusable output for lone quote char in varchar column. | ||
|---|---|---|---|
| Submitted: | 24 May 2005 13:17 | Modified: | 24 May 2005 13:53 |
| Reporter: | Erik Bäckerud | Email Updates: | |
| Status: | Can't repeat | Impact on me: | |
| Category: | MySQL Server: mysqldump Command-line Client | Severity: | S2 (Serious) |
| Version: | mysql-5.0.4-beta | OS: | Linux (Linux 2.6.10) |
| Assigned to: | CPU Architecture: | Any | |
[24 May 2005 13:53]
MySQL Verification Team
I was unable to repeat this issue with the current BK source mysqldump.

Description: Mysqldump (version 10.10) produces erroneous output when dumping a varchar() column containing just a single quotation mark " or a single apostrophe '. If the quotation mark is embedded within a longer string it seems to work allright. Previously I used version 9.07 of mysqldump and it does not have this bug. How to repeat: #!/bin/sh # Demonstrate bug in mysqldump v. 10.10 echo 'DROP TABLE if exists test1;' | mysql test echo 'CREATE TABLE test1 (KULUM varchar(50));' | mysql test echo "INSERT INTO test1 set KULUM='\\\"'" | mysql test echo "INSERT INTO test1 set KULUM='\\''" | mysql test echo "INSERT INTO test1 set KULUM='START\\\"END'" | mysql test echo "INSERT INTO test1 set KULUM='START\\\"'" | mysql test echo "INSERT INTO test1 set KULUM='\\\"END'" | mysql test /usr/local/mysql/bin/mysqldump --skip-opt test test1 Run the above shell script and observe the output line: INSERT INTO `test1` VALUES ('),('),('START\"END'),('START\"'),('\"END'); Which is clearly not legal syntax.