Ascii Null not handled in print_string

Bug #1007450 reported by Yves Trudeau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Data Recovery Tool for InnoDB
Fix Committed
High
Aleksandr Kuzminsky

Bug Description

Just found cases where ascii nulls (\0) are in TEXT columns. The following change fix it

--- print_data.c.orig 2012-06-01 16:26:38.000000000 +0200
+++ print_data.c 2012-06-01 16:11:45.000000000 +0200
@@ -159,6 +159,7 @@
                else if (value[i] == '\n') out[out_pos++] = '\\', out[out_pos++] = 'n';
                else if (value[i] == '\r') out[out_pos++] = '\\', out[out_pos++] = 'r';
                else if (value[i] == '\t') out[out_pos++] = '\\', out[out_pos++] = 't';
+ else if (value[i] == '\0') out[out_pos++] = '\\', out[out_pos++] = '0';
        else {
             if (value[i] == ' ') {
                 num_spaces++;

Changed in percona-data-recovery-tool-for-innodb:
importance: Undecided → High
Changed in percona-data-recovery-tool-for-innodb:
status: New → Fix Committed
assignee: nobody → Aleksandr Kuzminsky (akuzminsky)
milestone: none → release-0.6
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.