VARBINARY type is recovered incorrectly

Bug #841743 reported by Aleksandr Kuzminsky
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

CREATE TABLE `t1` (
  `id` int NOT NULL auto_increment,
  `f1` varchar(255) NOT NULL default '',
  `f2` varbinary(255) NOT NULL,
  `f3` BINARY(10) NOT NULL ,

  `f4` CHAR(10) NOT NULL ,
  PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=UTF8;

INSERT INTO t1 VALUES(NULL, 'aaa', 'bbb', 'ccc', 'dddd');

Recivered as:

$ ./constraints_parser -5Uf ./pages-1314783910/FIL_PAGE_INDEX/0-68/0-00000003.page
t2 1 "aaa" 626262626262 6363630000000000000063636300000000000000 "dddd "

LOAD DATA INFILE '/home/akuzminsky/src/percona-innodb-recovery-tool/With_binary_support/dumps/default/t2' REPLACE INTO TABLE `t2` FIELDS TERMINATED BY '\t' OPTIONALLY ENCLOSED BY '"' LINES STARTING BY 't2\t' (id, f1, @var_f2, @var_f3, f4)
SET
    f2 = UNHEX(@var_f2),
    f3 = UNHEX(@var_f3);

Related branches

Changed in percona-data-recovery-tool-for-innodb:
milestone: none → release-0.6
assignee: nobody → Aleksandr Kuzminsky (akuzminsky)
importance: Undecided → High
status: New → Confirmed
Changed in percona-data-recovery-tool-for-innodb:
status: Confirmed → In Progress
Revision history for this message
Yves Trudeau (y-trudeau) wrote :

Hi Aleksandr,

I forgot a "break;" in print_data.c ...

--- print_data.c.orig 2011-09-28 22:38:51.039050435 +0000
+++ print_data.c 2011-09-28 22:39:05.359244526 +0000
@@ -214,6 +214,7 @@

                 case FT_BIN:
                         print_hex((char*)value, len);
+ break;

   case FT_BLOB:
               print_hex((char*)value, len);

Changed in percona-data-recovery-tool-for-innodb:
status: In Progress → Fix Committed
Revision history for this message
Aleksandr Kuzminsky (akuzminsky) wrote :

No fixed. "break;" was lost after FT_BIN:

230
                case FT_BIN:

231
                        print_hex((char*)value, len);

232

230
233
                case FT_BLOB:

Changed in percona-data-recovery-tool-for-innodb:
status: Fix Committed → Won't Fix
status: Won't Fix → In Progress
Changed in percona-data-recovery-tool-for-innodb:
status: In Progress → 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.