Description:
When using ndb_recover on 4.1.7 there seems to be a bug in ndb_restore (or somewhere in the backup/restore process) that converts varchar fields to be all uppercase instead of preserving the case.
How to repeat:
Very simple setup:
1 ndb_mgmd
1 ndbd
1 mysqld_safe
All on the same machine.
CREATE TABLE `shopper_id` (
`shopper_id` varchar(32) NOT NULL default '',
PRIMARY KEY (`shopper_id`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
insert into shopper_id (`shopper_id`) values('asdfASDF');
select * from shopper_id;
+------------+
| shopper_id |
+------------+
| asdfASDF |
+------------+
1 row in set (0.00 sec)
Then I execute:
`echo "start backup" | ndb_mgm`
Then I shutdown the cluster cleanly and then bring it back up with:
`ndbd --initial`
Then I exec:
`ndb_restore -n 2 -b 1 -m BACKUP/BACKUP-1/`
`ndb_restore -n 2 -b 1 -r BACKUP/BACKUP-1/`
Then back in mysql:
select * from shopper_id;
+------------+
| shopper_id |
+------------+
| ASDFASDF |
+------------+
1 row in set (0.00 sec)
Thats not good.
Here is my config.ini:
[NDBD DEFAULT]
NoOfReplicas= 1
MaxNoOfOrderedIndexes= 2048
MaxNoOfUniqueHashIndexes= 1024
MaxNoOfTables= 800
MaxNoOfAttributes= 2000
[MYSQLD DEFAULT]
[NDB_MGMD DEFAULT]
[TCP DEFAULT]
[NDB_MGMD]
HostName= localhost
[NDBD]
HostName= localhost
DataDir= /var/lib/mysql-cluster
[MYSQLD]
[MYSQLD]
[MYSQLD]
Suggested fix:
Backup and restore functions should not change case of data.