Bug #36388 NDB_RESTORE of 5.1-ndb metadata to 5.1-6.2 returns Incorrect information in frm
Submitted: 29 Apr 2008 2:21 Modified: 12 Aug 2008 14:45
Reporter: Jonathan Miller Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:5.1-telco-6.2 OS:Linux
Assigned to: Martin Skold CPU Architecture:Any

[29 Apr 2008 2:21] Jonathan Miller
Description:
Hi,

While creating a stress test for BKA, I decided to use ndb_restore and just restore the database for the joins test due to size and time it takes to do inserts. 

As I was developing this test I noticed that 5.1-new would not restore due to the backup being a later version then restore. 

So I did a mysqldump of the data, restored it to 5.1-new and created new ndb backup file.

I have since found that when I try to restore to version other then 5.1-new (i.e. 5.1-telco-6.2 and 5.1-telco-6.3) I get the following using mysql.

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.1.24-ndb-6.2.14 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use joins
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+-----------------+
| Tables_in_joins |
+-----------------+
| t1              |
| t2              |
| t3              |
| t4              |
| t5              |
| t6              |
| t7              |
| t8              |
+-----------------+
8 rows in set, 8 warnings (0.00 sec)

mysql> select * from t1;
ERROR 1033 (HY000): Incorrect information in file: './joins/t1.frm'
mysql> show create table t1;
ERROR 1033 (HY000): Incorrect information in file: './joins/t1.frm'
mysql> insert into t1 values (1);
ERROR 1033 (HY000): Incorrect information in file: './joins/t1.frm'

In the SQL error log it shows:

080429  3:26:35 [ERROR] /data0/cr_autotest/libexec/mysqld: Incorrect information in file: './joins/t3.frm'
080429  3:26:35 [ERROR] /data0/cr_autotest/libexec/mysqld: Incorrect information in file: './joins/t4.frm'
080429  3:26:35 [ERROR] /data0/cr_autotest/libexec/mysqld: Incorrect information in file: './joins/t1.frm'
...
..
.
etc..

How to repeat:
1) Create an ndb back up of a 5.1-new database
2) Install version newer the 5.1-new
2) CREATE DATABASE X; using mysql
3) ndb_restore using the -m option only. You can restore the data, but found not needed.
[29 Apr 2008 2:22] Jonathan Miller
Workaround is to use mysqldump