Below is the list of changes that have just been committed into a local
5.1 repository of gni. When gni does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-04-10 11:56:10+08:00, gni@stripped +2 -0
BUG#33801 Add test case for it.
mysql-test/suite/ndb/r/ndb_restore.result@stripped, 2008-04-10 11:55:53+08:00,
gni@stripped +35 -1
Produce test result for bug#33801 (ndb_restore on particular table fails)
mysql-test/suite/ndb/t/ndb_restore.test@stripped, 2008-04-10 11:55:54+08:00,
gni@stripped +20 -1
Add test case for bug#33801 (ndb_restore on particular table fails)
diff -Nrup a/mysql-test/suite/ndb/r/ndb_restore.result
b/mysql-test/suite/ndb/r/ndb_restore.result
--- a/mysql-test/suite/ndb/r/ndb_restore.result 2007-08-28 21:45:17 +08:00
+++ b/mysql-test/suite/ndb/r/ndb_restore.result 2008-04-10 11:55:53 +08:00
@@ -485,6 +485,40 @@ SELECT @the_backup_id:=backup_id FROM te
@the_backup_id:=backup_id
<the_backup_id>
DROP TABLE test.backup_info;
+CREATE TABLE t11_c (
+c1 int primary key, c2 char(10), c3 varchar(10)
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
+CREATE TABLE t12_c (
+c1 int primary key, c2 char(10), c3 varchar(10)
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
+INSERT INTO t11_c VALUES(1, "aaaaa", "bbbbb"), (2, "ccccc", "ddddd"), (3, "eeeee",
"fffff");
+INSERT INTO t12_c VALUES(4, "ggggg", "hhhhh"), (5, "iiiii", "jjjjj"), (6, "kkkkk",
"lllll");
+CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE =
HEAP;
+DELETE FROM test.backup_info;
+LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ',';
+SELECT @the_backup_id:=backup_id FROM test.backup_info;
+@the_backup_id:=backup_id
+<the_backup_id>
+DROP TABLE test.backup_info;
+drop table t2_c,t11_c,t12_c;
+SHOW TABLES;
+Tables_in_test
+t1
+t10
+t2
+t3
+t4
+t5
+t6
+t7
+t8
+t9
+t11_c
+SELECT * FROM t11_c;
+c1 c2 c3
+3 eeeee fffff
+1 aaaaa bbbbb
+2 ccccc ddddd
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
-drop table if exists t2_c;
+drop table if exists t2_c,t11_c,t12_c;
520093696,<the_backup_id>
diff -Nrup a/mysql-test/suite/ndb/t/ndb_restore.test
b/mysql-test/suite/ndb/t/ndb_restore.test
--- a/mysql-test/suite/ndb/t/ndb_restore.test 2007-08-28 21:45:18 +08:00
+++ b/mysql-test/suite/ndb/t/ndb_restore.test 2008-04-10 11:55:54 +08:00
@@ -390,13 +390,32 @@ drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c
--source include/ndb_backup.inc
--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --core=0 -b $the_backup_id -n 1 -m -r
--ndb-nodegroup_map '(0,1)' $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id 2>&1 |
grep Translate || true
+CREATE TABLE t11_c (
+ c1 int primary key, c2 char(10), c3 varchar(10)
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
+
+CREATE TABLE t12_c (
+ c1 int primary key, c2 char(10), c3 varchar(10)
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
+
+INSERT INTO t11_c VALUES(1, "aaaaa", "bbbbb"), (2, "ccccc", "ddddd"), (3, "eeeee",
"fffff");
+INSERT INTO t12_c VALUES(4, "ggggg", "hhhhh"), (5, "iiiii", "jjjjj"), (6, "kkkkk",
"lllll");
+--source include/ndb_backup.inc
+drop table t2_c,t11_c,t12_c;
+# Only part of tables is restored, it should work
+--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print
--print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id test t11_c >>
$NDB_TOOLS_OUTPUT
+--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print
--print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id test t11_c >>
$NDB_TOOLS_OUTPUT
+
+#Should only t11_c is restored
+SHOW TABLES;
+SELECT * FROM t11_c;
#
# Cleanup
#
--disable_warnings
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
-drop table if exists t2_c;
+drop table if exists t2_c,t11_c,t12_c;
--enable_warnings
#
| Thread |
|---|
| • bk commit into 5.1 tree (gni:1.2661) BUG#33801 | gni | 10 Apr |