malformed output for VARCHAR fields containing null terminators

Bug #1068392 reported by James King
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Data Recovery Tool for InnoDB
Fix Committed
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.

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.