List:Commits« Previous MessageNext Message »
From:Martin Zaun Date:February 22 2011 9:16pm
Subject:bzr commit into mysql-5.1-telco-7.1 branch (martin.zaun:4102)
View as plain text  
#At file:///Users/mz/mysql/ndb-7.1-ndb_restore-test-cleanup/ based on revid:craig.russell@stripped

 4102 Martin Zaun	2011-02-22 [merge]
      merge from ndb-7.0 to ndb-7.1

    added:
      mysql-test/suite/ndb/r/ndb_restore_schema_tolerance.result
      mysql-test/suite/ndb/t/ndb_restore_schema_tolerance.test
    renamed:
      mysql-test/suite/ndb/r/ndb_blob_restore.result => mysql-test/suite/ndb/r/ndb_restore_schema_blobs.result
      mysql-test/suite/ndb/r/ndb_restore.result => mysql-test/suite/ndb/r/ndb_restore_misc.result
      mysql-test/suite/ndb/r/ndb_restore_compat.result => mysql-test/suite/ndb/r/ndb_restore_compat_downward.result
      mysql-test/suite/ndb/r/ndb_restore_different_endian_data.result => mysql-test/suite/ndb/r/ndb_restore_compat_endianness.result
      mysql-test/suite/ndb/r/ndb_restore_lossy_charbinary_conv.result => mysql-test/suite/ndb/r/ndb_restore_conv_lossy_charbinary.result
      mysql-test/suite/ndb/r/ndb_restore_lossy_integral_conv.result => mysql-test/suite/ndb/r/ndb_restore_conv_lossy_integral.result
      mysql-test/suite/ndb/r/ndb_restore_options.result => mysql-test/suite/ndb/r/ndb_restore_schema_subsets.result
      mysql-test/suite/ndb/r/ndb_restore_padding_preservation.result => mysql-test/suite/ndb/r/ndb_restore_conv_padding.result
      mysql-test/suite/ndb/r/ndb_restore_partition.result => mysql-test/suite/ndb/r/ndb_restore_schema_partitions.result
      mysql-test/suite/ndb/r/ndb_restore_promotion.result => mysql-test/suite/ndb/r/ndb_restore_conv_promotion.result
      mysql-test/suite/ndb/r/ndb_restore_rewrite_db.result => mysql-test/suite/ndb/r/ndb_restore_schema_rewrites.result
      mysql-test/suite/ndb/t/ndb_blob_restore.test => mysql-test/suite/ndb/t/ndb_restore_schema_blobs.test
      mysql-test/suite/ndb/t/ndb_restore.test => mysql-test/suite/ndb/t/ndb_restore_misc.test
      mysql-test/suite/ndb/t/ndb_restore_compat.test => mysql-test/suite/ndb/t/ndb_restore_compat_downward.test
      mysql-test/suite/ndb/t/ndb_restore_compressed-master.opt => mysql-test/suite/ndb/t/ndb_restore_compat_compression-master.opt
      mysql-test/suite/ndb/t/ndb_restore_compressed.test => mysql-test/suite/ndb/t/ndb_restore_compat_compression.test
      mysql-test/suite/ndb/t/ndb_restore_different_endian_data.test => mysql-test/suite/ndb/t/ndb_restore_compat_endianness.test
      mysql-test/suite/ndb/t/ndb_restore_lossy_charbinary_conv.test => mysql-test/suite/ndb/t/ndb_restore_conv_lossy_charbinary.test
      mysql-test/suite/ndb/t/ndb_restore_lossy_integral_conv.test => mysql-test/suite/ndb/t/ndb_restore_conv_lossy_integral.test
      mysql-test/suite/ndb/t/ndb_restore_options.test => mysql-test/suite/ndb/t/ndb_restore_schema_subsets.test
      mysql-test/suite/ndb/t/ndb_restore_padding_preservation.test => mysql-test/suite/ndb/t/ndb_restore_conv_padding.test
      mysql-test/suite/ndb/t/ndb_restore_partition.test => mysql-test/suite/ndb/t/ndb_restore_schema_partitions.test
      mysql-test/suite/ndb/t/ndb_restore_promotion.test => mysql-test/suite/ndb/t/ndb_restore_conv_promotion.test
      mysql-test/suite/ndb/t/ndb_restore_rewrite_db.test => mysql-test/suite/ndb/t/ndb_restore_schema_rewrites.test
    modified:
      mysql-test/suite/ndb/t/ndb_restore_print.test
      storage/ndb/src/mgmsrv/ConfigManager.cpp
      mysql-test/suite/ndb/r/ndb_restore_schema_subsets.result
      mysql-test/suite/ndb/t/ndb_restore_schema_blobs.test
      mysql-test/suite/ndb/t/ndb_restore_misc.test
      mysql-test/suite/ndb/t/ndb_restore_compat_downward.test
      mysql-test/suite/ndb/t/ndb_restore_compat_compression-master.opt
      mysql-test/suite/ndb/t/ndb_restore_compat_compression.test
      mysql-test/suite/ndb/t/ndb_restore_compat_endianness.test
      mysql-test/suite/ndb/t/ndb_restore_conv_lossy_charbinary.test
      mysql-test/suite/ndb/t/ndb_restore_conv_lossy_integral.test
      mysql-test/suite/ndb/t/ndb_restore_schema_subsets.test
      mysql-test/suite/ndb/t/ndb_restore_conv_padding.test
      mysql-test/suite/ndb/t/ndb_restore_schema_partitions.test
      mysql-test/suite/ndb/t/ndb_restore_conv_promotion.test
      mysql-test/suite/ndb/t/ndb_restore_schema_rewrites.test
=== renamed file 'mysql-test/suite/ndb/r/ndb_restore_compat.result' => 'mysql-test/suite/ndb/r/ndb_restore_compat_downward.result'
=== renamed file 'mysql-test/suite/ndb/r/ndb_restore_different_endian_data.result' => 'mysql-test/suite/ndb/r/ndb_restore_compat_endianness.result'
=== renamed file 'mysql-test/suite/ndb/r/ndb_restore_lossy_charbinary_conv.result' => 'mysql-test/suite/ndb/r/ndb_restore_conv_lossy_charbinary.result'
=== renamed file 'mysql-test/suite/ndb/r/ndb_restore_lossy_integral_conv.result' => 'mysql-test/suite/ndb/r/ndb_restore_conv_lossy_integral.result'
=== renamed file 'mysql-test/suite/ndb/r/ndb_restore_padding_preservation.result' => 'mysql-test/suite/ndb/r/ndb_restore_conv_padding.result'
=== renamed file 'mysql-test/suite/ndb/r/ndb_restore_promotion.result' => 'mysql-test/suite/ndb/r/ndb_restore_conv_promotion.result'
=== renamed file 'mysql-test/suite/ndb/r/ndb_restore.result' => 'mysql-test/suite/ndb/r/ndb_restore_misc.result'
=== renamed file 'mysql-test/suite/ndb/r/ndb_blob_restore.result' => 'mysql-test/suite/ndb/r/ndb_restore_schema_blobs.result'
=== renamed file 'mysql-test/suite/ndb/r/ndb_restore_partition.result' => 'mysql-test/suite/ndb/r/ndb_restore_schema_partitions.result'
=== renamed file 'mysql-test/suite/ndb/r/ndb_restore_rewrite_db.result' => 'mysql-test/suite/ndb/r/ndb_restore_schema_rewrites.result'
=== renamed file 'mysql-test/suite/ndb/r/ndb_restore_options.result' => 'mysql-test/suite/ndb/r/ndb_restore_schema_subsets.result'
--- a/mysql-test/suite/ndb/r/ndb_restore_options.result	2010-06-11 20:30:56 +0000
+++ b/mysql-test/suite/ndb/r/ndb_restore_schema_subsets.result	2011-02-22 03:29:24 +0000
@@ -510,181 +510,3 @@ tab2
 drop table db2.tab1, db2.tab2;
 drop database db1;
 drop database db2;
-Test ndb_restore ability to ignore some schema differences
-use test;
-create table t1 (
-a int,
-b int,
-c int,
-d int,
-e varchar(200),
-f int,
-g char(20),
-h text,
-i int,
-primary key(a,b)) TABLESPACE ts1 engine = ndb;
-insert into t1 values
-(1, 1, 1, 1, '1', 1, 'Rankin', 'Rebus', 1),
-(2, 2, 2, 2, '2', 2, 'Doyle', 'Holmes', 2),
-(3, 3, 3, 3, '3', 3, 'Burns', 'Mouse', 3),
-(4, 4, 4, 4, '4', 4, 'Gibbon', 'Chris', 4),
-(5, 5, 5, 5, '5', 5, 'Gray', 'Lanark', 5);
-select * from t1 order by a;
-a	b	c	d	e	f	g	h	i
-1	1	1	1	1	1	Rankin	Rebus	1
-2	2	2	2	2	2	Doyle	Holmes	2
-3	3	3	3	3	3	Burns	Mouse	3
-4	4	4	4	4	4	Gibbon	Chris	4
-5	5	5	5	5	5	Gray	Lanark	5
-Backing up data
-drop table t1;
-Normal restore
-show create table t1;
-Table	Create Table
-t1	CREATE TABLE `t1` (
-  `a` int(11) NOT NULL DEFAULT '0',
-  `b` int(11) NOT NULL DEFAULT '0',
-  `c` int(11) DEFAULT NULL,
-  `d` int(11) DEFAULT NULL,
-  `e` varchar(200) DEFAULT NULL,
-  `f` int(11) DEFAULT NULL,
-  `g` char(20) DEFAULT NULL,
-  `h` text,
-  `i` int(11) DEFAULT NULL,
-  PRIMARY KEY (`a`,`b`)
-) /*!50100 TABLESPACE ts1 */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
-select * from t1 order by a;
-a	b	c	d	e	f	g	h	i
-1	1	1	1	1	1	Rankin	Rebus	1
-2	2	2	2	2	2	Doyle	Holmes	2
-3	3	3	3	3	3	Burns	Mouse	3
-4	4	4	4	4	4	Gibbon	Chris	4
-5	5	5	5	5	5	Gray	Lanark	5
-truncate t1;
-Column name change, should fail without --exclude-missing-columns
-alter table t1 change c cc int;
-Retry with --exclude-missing-columns
-select * from t1 order by a;
-a	b	cc	d	e	f	g	h	i
-1	1	NULL	1	1	1	Rankin	Rebus	1
-2	2	NULL	2	2	2	Doyle	Holmes	2
-3	3	NULL	3	3	3	Burns	Mouse	3
-4	4	NULL	4	4	4	Gibbon	Chris	4
-5	5	NULL	5	5	5	Gray	Lanark	5
-truncate t1;
-Column type change, should fail
-alter table t1 change cc c bigint;
-show create table t1;
-Table	Create Table
-t1	CREATE TABLE `t1` (
-  `a` int(11) NOT NULL DEFAULT '0',
-  `b` int(11) NOT NULL DEFAULT '0',
-  `c` bigint(20) DEFAULT NULL,
-  `d` int(11) DEFAULT NULL,
-  `e` varchar(200) DEFAULT NULL,
-  `f` int(11) DEFAULT NULL,
-  `g` char(20) DEFAULT NULL,
-  `h` text,
-  `i` int(11) DEFAULT NULL,
-  PRIMARY KEY (`a`,`b`)
-) /*!50100 TABLESPACE ts1 */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
-Retry with --promote-attribute
-select * from t1 order by a;
-a	b	c	d	e	f	g	h	i
-1	1	1	1	1	1	Rankin	Rebus	1
-2	2	2	2	2	2	Doyle	Holmes	2
-3	3	3	3	3	3	Burns	Mouse	3
-4	4	4	4	4	4	Gibbon	Chris	4
-5	5	5	5	5	5	Gray	Lanark	5
-truncate t1;
-Column nullability change, should fail
-alter table t1 change c c int not null;
-alter table t1 change c c int;
-Column length change, should fail
-alter table t1 change g g char(22);
-Character set difference, should fail
-alter table t1 change g g char(20) character set binary;
-alter table t1 change g g char(20);
-AutoIncrement difference, should fail
-alter table t1 change b b int auto_increment;
-Default difference, should pass 
-alter table t1 change b b int default 22;
-select * from t1 order by a;
-a	b	c	d	e	f	g	h	i
-1	1	1	1	1	1	Rankin	Rebus	1
-2	2	2	2	2	2	Doyle	Holmes	2
-3	3	3	3	3	3	Burns	Mouse	3
-4	4	4	4	4	4	Gibbon	Chris	4
-5	5	5	5	5	5	Gray	Lanark	5
-truncate t1;
-alter table t1 change b b int;
-ArrayType difference, should fail
-alter table t1 change e e varchar(300);
-alter table t1 change e e varchar(200);
-StorageType difference, should pass
-CREATE LOGFILE GROUP lg1
-ADD UNDOFILE 'undofile.dat'
-INITIAL_SIZE 16M
-UNDO_BUFFER_SIZE = 1M
-ENGINE=NDB;
-CREATE TABLESPACE ts1
-ADD DATAFILE 'datafile.dat'
-USE LOGFILE GROUP lg1
-INITIAL_SIZE 12M
-ENGINE NDB;
-alter table t1 change i i int storage disk;
-select * from t1 order by a;
-a	b	c	d	e	f	g	h	i
-1	1	1	1	1	1	Rankin	Rebus	1
-2	2	2	2	2	2	Doyle	Holmes	2
-3	3	3	3	3	3	Burns	Mouse	3
-4	4	4	4	4	4	Gibbon	Chris	4
-5	5	5	5	5	5	Gray	Lanark	5
-alter table t1 change i i int storage memory;
-truncate t1;
-Dynamic property difference, should pass
-alter table t1 change c c int column_format dynamic;
-select * from t1 order by a;
-a	b	c	d	e	f	g	h	i
-1	1	1	1	1	1	Rankin	Rebus	1
-2	2	2	2	2	2	Doyle	Holmes	2
-3	3	3	3	3	3	Burns	Mouse	3
-4	4	4	4	4	4	Gibbon	Chris	4
-5	5	5	5	5	5	Gray	Lanark	5
-drop table t1;
-alter tablespace ts1 drop datafile 'datafile.dat' engine=ndb;
-drop tablespace ts1 engine=ndb;
-drop logfile group lg1 engine=ndb;
-Different PK columns, should fail
-create table t1 (
-a int,
-b int,
-c int,
-d int,
-e varchar(200),
-f int,
-g char(20),
-h text,
-i int,
-primary key (a)) TABLESPACE ts1 engine = ndb;
-drop table t1;
-Different distribution keys, should pass
-create table t1 (
-a int,
-b int,
-c int,
-d int,
-e varchar(200),
-f int,
-g char(20),
-h text,
-i int,
-primary key(a,b)) TABLESPACE ts1 engine = ndb partition by key(a);
-select * from t1 order by a;
-a	b	c	d	e	f	g	h	i
-1	1	1	1	1	1	Rankin	Rebus	1
-2	2	2	2	2	2	Doyle	Holmes	2
-3	3	3	3	3	3	Burns	Mouse	3
-4	4	4	4	4	4	Gibbon	Chris	4
-5	5	5	5	5	5	Gray	Lanark	5
-drop table t1;

=== added file 'mysql-test/suite/ndb/r/ndb_restore_schema_tolerance.result'
--- a/mysql-test/suite/ndb/r/ndb_restore_schema_tolerance.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/ndb/r/ndb_restore_schema_tolerance.result	2011-02-22 03:29:24 +0000
@@ -0,0 +1,178 @@
+Test ndb_restore ability to ignore some schema differences
+use test;
+create table t1 (
+a int,
+b int,
+c int,
+d int,
+e varchar(200),
+f int,
+g char(20),
+h text,
+i int,
+primary key(a,b)) TABLESPACE ts1 engine = ndb;
+insert into t1 values
+(1, 1, 1, 1, '1', 1, 'Rankin', 'Rebus', 1),
+(2, 2, 2, 2, '2', 2, 'Doyle', 'Holmes', 2),
+(3, 3, 3, 3, '3', 3, 'Burns', 'Mouse', 3),
+(4, 4, 4, 4, '4', 4, 'Gibbon', 'Chris', 4),
+(5, 5, 5, 5, '5', 5, 'Gray', 'Lanark', 5);
+select * from t1 order by a;
+a	b	c	d	e	f	g	h	i
+1	1	1	1	1	1	Rankin	Rebus	1
+2	2	2	2	2	2	Doyle	Holmes	2
+3	3	3	3	3	3	Burns	Mouse	3
+4	4	4	4	4	4	Gibbon	Chris	4
+5	5	5	5	5	5	Gray	Lanark	5
+Backing up data
+drop table t1;
+Normal restore
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) NOT NULL DEFAULT '0',
+  `b` int(11) NOT NULL DEFAULT '0',
+  `c` int(11) DEFAULT NULL,
+  `d` int(11) DEFAULT NULL,
+  `e` varchar(200) DEFAULT NULL,
+  `f` int(11) DEFAULT NULL,
+  `g` char(20) DEFAULT NULL,
+  `h` text,
+  `i` int(11) DEFAULT NULL,
+  PRIMARY KEY (`a`,`b`)
+) /*!50100 TABLESPACE ts1 */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
+select * from t1 order by a;
+a	b	c	d	e	f	g	h	i
+1	1	1	1	1	1	Rankin	Rebus	1
+2	2	2	2	2	2	Doyle	Holmes	2
+3	3	3	3	3	3	Burns	Mouse	3
+4	4	4	4	4	4	Gibbon	Chris	4
+5	5	5	5	5	5	Gray	Lanark	5
+truncate t1;
+Column name change, should fail without --exclude-missing-columns
+alter table t1 change c cc int;
+Retry with --exclude-missing-columns
+select * from t1 order by a;
+a	b	cc	d	e	f	g	h	i
+1	1	NULL	1	1	1	Rankin	Rebus	1
+2	2	NULL	2	2	2	Doyle	Holmes	2
+3	3	NULL	3	3	3	Burns	Mouse	3
+4	4	NULL	4	4	4	Gibbon	Chris	4
+5	5	NULL	5	5	5	Gray	Lanark	5
+truncate t1;
+Column type change, should fail
+alter table t1 change cc c bigint;
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) NOT NULL DEFAULT '0',
+  `b` int(11) NOT NULL DEFAULT '0',
+  `c` bigint(20) DEFAULT NULL,
+  `d` int(11) DEFAULT NULL,
+  `e` varchar(200) DEFAULT NULL,
+  `f` int(11) DEFAULT NULL,
+  `g` char(20) DEFAULT NULL,
+  `h` text,
+  `i` int(11) DEFAULT NULL,
+  PRIMARY KEY (`a`,`b`)
+) /*!50100 TABLESPACE ts1 */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
+Retry with --promote-attribute
+select * from t1 order by a;
+a	b	c	d	e	f	g	h	i
+1	1	1	1	1	1	Rankin	Rebus	1
+2	2	2	2	2	2	Doyle	Holmes	2
+3	3	3	3	3	3	Burns	Mouse	3
+4	4	4	4	4	4	Gibbon	Chris	4
+5	5	5	5	5	5	Gray	Lanark	5
+truncate t1;
+Column nullability change, should fail
+alter table t1 change c c int not null;
+alter table t1 change c c int;
+Column length change, should fail
+alter table t1 change g g char(22);
+Character set difference, should fail
+alter table t1 change g g char(20) character set binary;
+alter table t1 change g g char(20);
+AutoIncrement difference, should fail
+alter table t1 change b b int auto_increment;
+Default difference, should pass 
+alter table t1 change b b int default 22;
+select * from t1 order by a;
+a	b	c	d	e	f	g	h	i
+1	1	1	1	1	1	Rankin	Rebus	1
+2	2	2	2	2	2	Doyle	Holmes	2
+3	3	3	3	3	3	Burns	Mouse	3
+4	4	4	4	4	4	Gibbon	Chris	4
+5	5	5	5	5	5	Gray	Lanark	5
+truncate t1;
+alter table t1 change b b int;
+ArrayType difference, should fail
+alter table t1 change e e varchar(300);
+alter table t1 change e e varchar(200);
+StorageType difference, should pass
+CREATE LOGFILE GROUP lg1
+ADD UNDOFILE 'undofile.dat'
+INITIAL_SIZE 16M
+UNDO_BUFFER_SIZE = 1M
+ENGINE=NDB;
+CREATE TABLESPACE ts1
+ADD DATAFILE 'datafile.dat'
+USE LOGFILE GROUP lg1
+INITIAL_SIZE 12M
+ENGINE NDB;
+alter table t1 change i i int storage disk;
+select * from t1 order by a;
+a	b	c	d	e	f	g	h	i
+1	1	1	1	1	1	Rankin	Rebus	1
+2	2	2	2	2	2	Doyle	Holmes	2
+3	3	3	3	3	3	Burns	Mouse	3
+4	4	4	4	4	4	Gibbon	Chris	4
+5	5	5	5	5	5	Gray	Lanark	5
+alter table t1 change i i int storage memory;
+truncate t1;
+Dynamic property difference, should pass
+alter table t1 change c c int column_format dynamic;
+select * from t1 order by a;
+a	b	c	d	e	f	g	h	i
+1	1	1	1	1	1	Rankin	Rebus	1
+2	2	2	2	2	2	Doyle	Holmes	2
+3	3	3	3	3	3	Burns	Mouse	3
+4	4	4	4	4	4	Gibbon	Chris	4
+5	5	5	5	5	5	Gray	Lanark	5
+drop table t1;
+alter tablespace ts1 drop datafile 'datafile.dat' engine=ndb;
+drop tablespace ts1 engine=ndb;
+drop logfile group lg1 engine=ndb;
+Different PK columns, should fail
+create table t1 (
+a int,
+b int,
+c int,
+d int,
+e varchar(200),
+f int,
+g char(20),
+h text,
+i int,
+primary key (a)) TABLESPACE ts1 engine = ndb;
+drop table t1;
+Different distribution keys, should pass
+create table t1 (
+a int,
+b int,
+c int,
+d int,
+e varchar(200),
+f int,
+g char(20),
+h text,
+i int,
+primary key(a,b)) TABLESPACE ts1 engine = ndb partition by key(a);
+select * from t1 order by a;
+a	b	c	d	e	f	g	h	i
+1	1	1	1	1	1	Rankin	Rebus	1
+2	2	2	2	2	2	Doyle	Holmes	2
+3	3	3	3	3	3	Burns	Mouse	3
+4	4	4	4	4	4	Gibbon	Chris	4
+5	5	5	5	5	5	Gray	Lanark	5
+drop table t1;

=== renamed file 'mysql-test/suite/ndb/t/ndb_restore_compressed-master.opt' => 'mysql-test/suite/ndb/t/ndb_restore_compat_compression-master.opt'
--- a/mysql-test/suite/ndb/t/ndb_restore_compressed-master.opt	2009-04-09 15:27:21 +0000
+++ b/mysql-test/suite/ndb/t/ndb_restore_compat_compression-master.opt	2011-02-22 01:15:42 +0000
@@ -1 +1 @@
---result-file=../suite/ndb/r/ndb_restore
+--result-file=../suite/ndb/r/ndb_restore_misc

=== renamed file 'mysql-test/suite/ndb/t/ndb_restore_compressed.test' => 'mysql-test/suite/ndb/t/ndb_restore_compat_compression.test'
--- a/mysql-test/suite/ndb/t/ndb_restore_compressed.test	2009-10-06 12:03:16 +0000
+++ b/mysql-test/suite/ndb/t/ndb_restore_compat_compression.test	2011-02-22 03:29:24 +0000
@@ -1,8 +1,12 @@
-# Turn on compressed backup with magic DUMP command
+######################################################################
+# Test restoring compressed backups
+######################################################################
+
+# turn on compressed backup with magic DUMP command
 --exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "all dump 13001 1" >> $NDB_TOOLS_OUTPUT
 
-# Run the ndb_restore test, should produce exactly the same output 
-source ndb_restore.test;
+# run the ndb_restore test, should produce exactly the same output 
+source ndb_restore_misc.test;
 
-# Turn off compressed backups
+# turn off compressed backups
 --exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "all dump 13001 0" >> $NDB_TOOLS_OUTPUT

=== renamed file 'mysql-test/suite/ndb/t/ndb_restore_compat.test' => 'mysql-test/suite/ndb/t/ndb_restore_compat_downward.test'
--- a/mysql-test/suite/ndb/t/ndb_restore_compat.test	2010-12-03 09:36:45 +0000
+++ b/mysql-test/suite/ndb/t/ndb_restore_compat_downward.test	2011-02-22 03:29:24 +0000
@@ -1,3 +1,7 @@
+######################################################################
+# Test restoring backups of older/packed formats
+######################################################################
+
 -- source include/have_ndb.inc
 -- source include/have_case_sensitive_file_system.inc
 

=== renamed file 'mysql-test/suite/ndb/t/ndb_restore_different_endian_data.test' => 'mysql-test/suite/ndb/t/ndb_restore_compat_endianness.test'
--- a/mysql-test/suite/ndb/t/ndb_restore_different_endian_data.test	2010-10-25 09:15:03 +0000
+++ b/mysql-test/suite/ndb/t/ndb_restore_compat_endianness.test	2011-02-22 03:29:24 +0000
@@ -1,3 +1,7 @@
+######################################################################
+# Test restoring backups of different endianness
+######################################################################
+
 -- source include/have_ndb.inc
 -- source include/ndb_default_cluster.inc
 

=== renamed file 'mysql-test/suite/ndb/t/ndb_restore_lossy_charbinary_conv.test' => 'mysql-test/suite/ndb/t/ndb_restore_conv_lossy_charbinary.test'
--- a/mysql-test/suite/ndb/t/ndb_restore_lossy_charbinary_conv.test	2010-10-23 06:46:02 +0000
+++ b/mysql-test/suite/ndb/t/ndb_restore_conv_lossy_charbinary.test	2011-02-22 03:29:24 +0000
@@ -1,7 +1,5 @@
 ######################################################################
-# Author: Martin Zaun
-# Date: 2010-10
-# Purpose: Lossy conversion test for [var]char and [var]binary types
+# Test restoring backups with lossy conversions on [var]char|binary types
 ######################################################################
 
 -- source include/have_ndb.inc

=== renamed file 'mysql-test/suite/ndb/t/ndb_restore_lossy_integral_conv.test' => 'mysql-test/suite/ndb/t/ndb_restore_conv_lossy_integral.test'
--- a/mysql-test/suite/ndb/t/ndb_restore_lossy_integral_conv.test	2010-10-23 06:46:02 +0000
+++ b/mysql-test/suite/ndb/t/ndb_restore_conv_lossy_integral.test	2011-02-22 03:29:24 +0000
@@ -1,7 +1,5 @@
 ######################################################################
-# Author: Martin Zaun
-# Date: 2010-10
-# Purpose: Lossy conversion test for integral types
+# Test restoring backups with lossy conversions on integral types
 ######################################################################
 
 -- source include/have_ndb.inc

=== renamed file 'mysql-test/suite/ndb/t/ndb_restore_padding_preservation.test' => 'mysql-test/suite/ndb/t/ndb_restore_conv_padding.test'
--- a/mysql-test/suite/ndb/t/ndb_restore_padding_preservation.test	2010-10-23 06:46:02 +0000
+++ b/mysql-test/suite/ndb/t/ndb_restore_conv_padding.test	2011-02-22 03:29:24 +0000
@@ -1,7 +1,5 @@
 ######################################################################
-# Author: Martin Zaun
-# Date: 2010-10
-# Purpose: Right-padding preservation test for char and binary types
+# Test restoring backups with preserving padding in char/bin conversions
 ######################################################################
 
 -- source include/have_ndb.inc

=== renamed file 'mysql-test/suite/ndb/t/ndb_restore_promotion.test' => 'mysql-test/suite/ndb/t/ndb_restore_conv_promotion.test'
--- a/mysql-test/suite/ndb/t/ndb_restore_promotion.test	2010-04-29 14:52:05 +0000
+++ b/mysql-test/suite/ndb/t/ndb_restore_conv_promotion.test	2011-02-22 03:29:24 +0000
@@ -1,8 +1,6 @@
-#############################################################
-# Author: Guangbao
-# Date: 2007-11
-# Purpose: Basic Integer,Char and Binary type promotion test 
-##############################################################
+######################################################################
+# Test restoring backups with widening type conversions (promotion)
+######################################################################
 
 -- source include/have_ndb.inc
 -- source include/not_embedded.inc

=== renamed file 'mysql-test/suite/ndb/t/ndb_restore.test' => 'mysql-test/suite/ndb/t/ndb_restore_misc.test'
--- a/mysql-test/suite/ndb/t/ndb_restore.test	2011-01-21 10:29:46 +0000
+++ b/mysql-test/suite/ndb/t/ndb_restore_misc.test	2011-02-22 03:29:24 +0000
@@ -1,3 +1,7 @@
+######################################################################
+# Test various issues ndb_restore had at some time
+######################################################################
+
 -- source include/have_ndb.inc
 -- source include/ndb_default_cluster.inc
 

=== modified file 'mysql-test/suite/ndb/t/ndb_restore_print.test'
--- a/mysql-test/suite/ndb/t/ndb_restore_print.test	2009-04-08 13:19:57 +0000
+++ b/mysql-test/suite/ndb/t/ndb_restore_print.test	2011-02-22 01:15:42 +0000
@@ -1,3 +1,7 @@
+######################################################################
+# Test ndb_restore's print_data feature
+######################################################################
+
 -- source include/have_ndb.inc
 -- source include/ndb_default_cluster.inc
 

=== renamed file 'mysql-test/suite/ndb/t/ndb_blob_restore.test' => 'mysql-test/suite/ndb/t/ndb_restore_schema_blobs.test'
--- a/mysql-test/suite/ndb/t/ndb_blob_restore.test	2008-12-22 11:10:00 +0000
+++ b/mysql-test/suite/ndb/t/ndb_restore_schema_blobs.test	2011-02-22 03:29:24 +0000
@@ -1,3 +1,7 @@
+######################################################################
+# Test restoring backups with blob columns
+######################################################################
+
 -- source include/have_ndb.inc
 -- source include/ndb_default_cluster.inc
 

=== renamed file 'mysql-test/suite/ndb/t/ndb_restore_partition.test' => 'mysql-test/suite/ndb/t/ndb_restore_schema_partitions.test'
--- a/mysql-test/suite/ndb/t/ndb_restore_partition.test	2009-10-09 15:08:04 +0000
+++ b/mysql-test/suite/ndb/t/ndb_restore_schema_partitions.test	2011-02-22 03:29:24 +0000
@@ -1,3 +1,7 @@
+######################################################################
+# Test restoring backups into partitioned tables
+######################################################################
+
 -- source include/have_ndb.inc
 -- source include/ndb_default_cluster.inc
 

=== renamed file 'mysql-test/suite/ndb/t/ndb_restore_rewrite_db.test' => 'mysql-test/suite/ndb/t/ndb_restore_schema_rewrites.test'
--- a/mysql-test/suite/ndb/t/ndb_restore_rewrite_db.test	2011-02-02 10:17:58 +0000
+++ b/mysql-test/suite/ndb/t/ndb_restore_schema_rewrites.test	2011-02-22 03:29:24 +0000
@@ -1,7 +1,5 @@
 ######################################################################
-# Author: Martin Zaun
-# Date: 2011-01
-# Purpose: test of rewrite-database feature
+# Test restoring backups into renamed databases
 ######################################################################
 
 -- source include/have_ndb.inc

=== renamed file 'mysql-test/suite/ndb/t/ndb_restore_options.test' => 'mysql-test/suite/ndb/t/ndb_restore_schema_subsets.test'
--- a/mysql-test/suite/ndb/t/ndb_restore_options.test	2010-06-11 20:30:56 +0000
+++ b/mysql-test/suite/ndb/t/ndb_restore_schema_subsets.test	2011-02-22 03:29:24 +0000
@@ -1,8 +1,10 @@
+######################################################################
+# Test restoring backups with in- or excluding tables or databases
+######################################################################
+
 -- source include/have_ndb.inc
 -- source include/ndb_default_cluster.inc
 
-# Bug#40429 Ignore tables when restoring
-
 --echo *************************************
 --echo Creating various databases and tables
 --echo *************************************
@@ -346,206 +348,3 @@ drop table db2.tab1, db2.tab2;
 
 drop database db1;
 drop database db2;
-
-# End of bug 40429
-
-
---echo Test ndb_restore ability to ignore some schema differences
-
-use test;
-create table t1 (
-  a int,
-  b int,
-  c int,
-  d int,
-  e varchar(200),
-  f int,
-  g char(20),
-  h text,
-  i int,
-  primary key(a,b)) TABLESPACE ts1 engine = ndb;
-
-insert into t1 values
-        (1, 1, 1, 1, '1', 1, 'Rankin', 'Rebus', 1),
-        (2, 2, 2, 2, '2', 2, 'Doyle', 'Holmes', 2),
-        (3, 3, 3, 3, '3', 3, 'Burns', 'Mouse', 3),
-        (4, 4, 4, 4, '4', 4, 'Gibbon', 'Chris', 4),
-        (5, 5, 5, 5, '5', 5, 'Gray', 'Lanark', 5);
-
-select * from t1 order by a;
-
---echo Backing up data
---source include/ndb_backup.inc
-
-drop table t1;
-
---echo Normal restore
---exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r -m  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
---exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 2 -r     $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
-
-show create table t1;
-
-select * from t1 order by a;
-
-truncate t1;
-
---echo Column name change, should fail without --exclude-missing-columns
-
-alter table t1 change c cc int;
-
---error 1
---exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
-
---echo Retry with --exclude-missing-columns
-
---exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r --exclude-missing-columns $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
---exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 2 -r --exclude-missing-columns $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
-
-select * from t1 order by a;
-truncate t1;
-
---echo Column type change, should fail
-
-alter table t1 change cc c bigint;
-show create table t1; #REMOVE!
---error 1
---exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
-
---echo Retry with --promote-attribute
-
---exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r --promote-attribute $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
---exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 2 -r --promote-attribute $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
-
-select * from t1 order by a;
-truncate t1;
-
---echo Column nullability change, should fail
-
-alter table t1 change c c int not null;
-
---error 1
---exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
-
-alter table t1 change c c int;
-
-# Skip Precision and scale differences - should fail
-
---echo Column length change, should fail
-
-alter table t1 change g g char(22);
-
---error 1
---exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
-
---echo Character set difference, should fail
-
-alter table t1 change g g char(20) character set binary;
-
---error 1
---exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
-
-alter table t1 change g g char(20);
-
---echo AutoIncrement difference, should fail
-
-alter table t1 change b b int auto_increment;
-
---error 1
---exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
-
---echo Default difference, should pass 
-alter table t1 change b b int default 22;
-
---exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
---exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 2 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
-
-select * from t1 order by a;
-truncate t1;
-
-alter table t1 change b b int;
-
---echo ArrayType difference, should fail
-alter table t1 change e e varchar(300);
-
---error 1
---exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
-
-alter table t1 change e e varchar(200);
-
---echo StorageType difference, should pass
-CREATE LOGFILE GROUP lg1
-ADD UNDOFILE 'undofile.dat'
-INITIAL_SIZE 16M
-UNDO_BUFFER_SIZE = 1M
-ENGINE=NDB;
-
-CREATE TABLESPACE ts1
-ADD DATAFILE 'datafile.dat'
-USE LOGFILE GROUP lg1
-INITIAL_SIZE 12M
-ENGINE NDB;
-
-alter table t1 change i i int storage disk;
-
---exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
---exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 2 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
-
-select * from t1 order by a;
-
-alter table t1 change i i int storage memory;
-truncate t1;
-
-# Skip BlobType difference (should fail)
-
---echo Dynamic property difference, should pass
-
-alter table t1 change c c int column_format dynamic;
-
---exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
---exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 2 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
-
-select * from t1 order by a;
-
-drop table t1;
-alter tablespace ts1 drop datafile 'datafile.dat' engine=ndb;
-drop tablespace ts1 engine=ndb;
-drop logfile group lg1 engine=ndb;
-
---echo Different PK columns, should fail
-create table t1 (
-  a int,
-  b int,
-  c int,
-  d int,
-  e varchar(200),
-  f int,
-  g char(20),
-  h text,
-  i int,
-  primary key (a)) TABLESPACE ts1 engine = ndb;
-
---error 1
---exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
-
-drop table t1;
-
---echo Different distribution keys, should pass
-
-create table t1 (
-  a int,
-  b int,
-  c int,
-  d int,
-  e varchar(200),
-  f int,
-  g char(20),
-  h text,
-  i int,
-  primary key(a,b)) TABLESPACE ts1 engine = ndb partition by key(a);
-
---exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
---exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 2 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
-
-select * from t1 order by a;
-
-drop table t1;

=== added file 'mysql-test/suite/ndb/t/ndb_restore_schema_tolerance.test'
--- a/mysql-test/suite/ndb/t/ndb_restore_schema_tolerance.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/ndb/t/ndb_restore_schema_tolerance.test	2011-02-22 03:29:24 +0000
@@ -0,0 +1,206 @@
+######################################################################
+# Test restoring backups into similar schemas
+######################################################################
+
+-- source include/have_ndb.inc
+-- source include/ndb_default_cluster.inc
+
+--echo Test ndb_restore ability to ignore some schema differences
+
+use test;
+create table t1 (
+  a int,
+  b int,
+  c int,
+  d int,
+  e varchar(200),
+  f int,
+  g char(20),
+  h text,
+  i int,
+  primary key(a,b)) TABLESPACE ts1 engine = ndb;
+
+insert into t1 values
+        (1, 1, 1, 1, '1', 1, 'Rankin', 'Rebus', 1),
+        (2, 2, 2, 2, '2', 2, 'Doyle', 'Holmes', 2),
+        (3, 3, 3, 3, '3', 3, 'Burns', 'Mouse', 3),
+        (4, 4, 4, 4, '4', 4, 'Gibbon', 'Chris', 4),
+        (5, 5, 5, 5, '5', 5, 'Gray', 'Lanark', 5);
+
+select * from t1 order by a;
+
+--echo Backing up data
+--source include/ndb_backup.inc
+
+drop table t1;
+
+--echo Normal restore
+--exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r -m  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+--exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 2 -r     $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+
+show create table t1;
+
+select * from t1 order by a;
+
+truncate t1;
+
+--echo Column name change, should fail without --exclude-missing-columns
+
+alter table t1 change c cc int;
+
+--error 1
+--exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+
+--echo Retry with --exclude-missing-columns
+
+--exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r --exclude-missing-columns $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+--exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 2 -r --exclude-missing-columns $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+
+select * from t1 order by a;
+truncate t1;
+
+--echo Column type change, should fail
+
+alter table t1 change cc c bigint;
+show create table t1; #REMOVE!
+--error 1
+--exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+
+--echo Retry with --promote-attribute
+
+--exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r --promote-attribute $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+--exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 2 -r --promote-attribute $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+
+select * from t1 order by a;
+truncate t1;
+
+--echo Column nullability change, should fail
+
+alter table t1 change c c int not null;
+
+--error 1
+--exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+
+alter table t1 change c c int;
+
+# Skip Precision and scale differences - should fail
+
+--echo Column length change, should fail
+
+alter table t1 change g g char(22);
+
+--error 1
+--exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+
+--echo Character set difference, should fail
+
+alter table t1 change g g char(20) character set binary;
+
+--error 1
+--exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+
+alter table t1 change g g char(20);
+
+--echo AutoIncrement difference, should fail
+
+alter table t1 change b b int auto_increment;
+
+--error 1
+--exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+
+--echo Default difference, should pass 
+alter table t1 change b b int default 22;
+
+--exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+--exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 2 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+
+select * from t1 order by a;
+truncate t1;
+
+alter table t1 change b b int;
+
+--echo ArrayType difference, should fail
+alter table t1 change e e varchar(300);
+
+--error 1
+--exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+
+alter table t1 change e e varchar(200);
+
+--echo StorageType difference, should pass
+CREATE LOGFILE GROUP lg1
+ADD UNDOFILE 'undofile.dat'
+INITIAL_SIZE 16M
+UNDO_BUFFER_SIZE = 1M
+ENGINE=NDB;
+
+CREATE TABLESPACE ts1
+ADD DATAFILE 'datafile.dat'
+USE LOGFILE GROUP lg1
+INITIAL_SIZE 12M
+ENGINE NDB;
+
+alter table t1 change i i int storage disk;
+
+--exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+--exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 2 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+
+select * from t1 order by a;
+
+alter table t1 change i i int storage memory;
+truncate t1;
+
+# Skip BlobType difference (should fail)
+
+--echo Dynamic property difference, should pass
+
+alter table t1 change c c int column_format dynamic;
+
+--exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+--exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 2 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+
+select * from t1 order by a;
+
+drop table t1;
+alter tablespace ts1 drop datafile 'datafile.dat' engine=ndb;
+drop tablespace ts1 engine=ndb;
+drop logfile group lg1 engine=ndb;
+
+--echo Different PK columns, should fail
+create table t1 (
+  a int,
+  b int,
+  c int,
+  d int,
+  e varchar(200),
+  f int,
+  g char(20),
+  h text,
+  i int,
+  primary key (a)) TABLESPACE ts1 engine = ndb;
+
+--error 1
+--exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+
+drop table t1;
+
+--echo Different distribution keys, should pass
+
+create table t1 (
+  a int,
+  b int,
+  c int,
+  d int,
+  e varchar(200),
+  f int,
+  g char(20),
+  h text,
+  i int,
+  primary key(a,b)) TABLESPACE ts1 engine = ndb partition by key(a);
+
+--exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 1 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+--exec $NDB_RESTORE --no-defaults --core-file=false -b $the_backup_id -n 2 -r  $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+
+select * from t1 order by a;
+
+drop table t1;

=== modified file 'storage/ndb/src/mgmsrv/ConfigManager.cpp'
--- a/storage/ndb/src/mgmsrv/ConfigManager.cpp	2011-02-01 08:52:56 +0000
+++ b/storage/ndb/src/mgmsrv/ConfigManager.cpp	2011-02-22 21:16:11 +0000
@@ -1326,6 +1326,18 @@ ConfigManager::execCONFIG_CHECK_REQ(Sign
     other_checksum = checksum;
   }
 
+  if (m_prepared_config)
+  {
+    g_eventLogger->debug("Got CONFIG_CHECK_REQ from node: %d while "
+                         "config change in progress (m_prepared_config). "
+                         "Returning incorrect state, causing it to be retried",
+                         nodeId);
+    sendConfigCheckRef(ss, from, ConfigCheckRef::WrongState,
+                       generation, other_generation,
+                       m_config_state, CS_UNINITIALIZED);
+    return;
+  }
+
   g_eventLogger->debug("Got CONFIG_CHECK_REQ from node: %d. "
                        "Our generation: %d, other generation: %d, "
                        "our state: %d, other state: %d, "


Attachment: [text/bzr-bundle] bzr/martin.zaun@oracle.com-20110222211611-qwbpkrh89m0cl2l9.bundle
Thread
bzr commit into mysql-5.1-telco-7.1 branch (martin.zaun:4102) Martin Zaun22 Feb