malformed output for VARCHAR fields containing null terminators

Bug #1068392 reported by James King on 2012-10-19
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Data Recovery Tool for InnoDB
Undecided
Unassigned

Bug Description

If a string in a VARCHAR field has \x00, the output from constraints_parser for that row will be malformed; the field will be truncated at the null terminator, and no closing quote will be added, messing up all following fields in the row.

James King (t-james-king) wrote :

The print_string() function in print_data.c handles the escaping of backslashes, double quotes, tabs, and LF/CR, but not null characters. The attached patch appears to fix the issue.

Looking at the Special Character Escape Sequences table at http://dev.mysql.com/doc/refman/5.0/en/string-literals.html, ASCII 26 may also need to be escaped in the same fashion if the resulting output will be loaded on a Windows machine. The other special characters do not appear to be relevant in a LOAD DATA INFILE context.

Changed in percona-data-recovery-tool-for-innodb:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers