List:Commits« Previous MessageNext Message »
From:Jonathan Miller Date:February 16 2006 1:24pm
Subject:bk commit into 5.1 tree (jmiller:1.2114)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of ndbdev. When ndbdev 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
  1.2114 06/02/16 14:24:47 jmiller@stripped +3 -0
  Updates from review

  mysql-test/t/ndb_dd_backuprestore.test
    1.2 06/02/16 14:24:23 jmiller@stripped +69 -45
    Updated with suggestions from Jonas

  mysql-test/include/ndb_restore_master.inc
    1.1 06/02/16 14:23:16 jmiller@stripped +12 -0
    We are writting test cases that use the ndb backup and restore. This new include contains all the code needed to restore a master cluster from the backup done with ndb_backup.inc. By moving the code here it will be easy to reuse

  mysql-test/include/ndb_restore_master.inc
    1.0 06/02/16 14:23:16 jmiller@stripped +0 -0
    BitKeeper file /home/ndbdev/jmiller/clones/mysql-5.1-new/mysql-test/include/ndb_restore_master.inc

  mysql-test/include/ndb_backup.inc
    1.1 06/02/16 14:21:51 jmiller@stripped +23 -0
    We are writting test cases that use the ndb backup. This new include contains all the code needed to start the backup and grab the backup ID for the test. By moving the code here it will be easy to reuse

  mysql-test/include/ndb_backup.inc
    1.0 06/02/16 14:21:51 jmiller@stripped +0 -0
    BitKeeper file /home/ndbdev/jmiller/clones/mysql-5.1-new/mysql-test/include/ndb_backup.inc

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jmiller
# Host:	ndb08.mysql.com
# Root:	/home/ndbdev/jmiller/clones/mysql-5.1-new
--- New file ---
+++ mysql-test/include/ndb_backup.inc	06/02/16 14:21:51
######################################################
# By JBM 2006-02-16 So that the code is not repeated #
# in test cases and can be reused.                   #
######################################################
--exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "star
t backup" >> $NDB_TOOLS_OUTPUT

# there is no neat way to find the backupid, this is a hack to find it...

--exec $NDB_TOOLS_DIR/ndb_select_all --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -
d sys --delimiter=',' SYSTAB_0 | grep 520093696 > var/tmp.dat

CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE =
HEAP;
DELETE FROM test.backup_info;

LOAD DATA INFILE '../../var/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY '
,';
--replace_column 1 <the_backup_id>
SELECT @the_backup_id:=backup_id FROM test.backup_info;
let the_backup_id=`select @the_backup_id`;
DROP TABLE test.backup_info;


--- New file ---
+++ mysql-test/include/ndb_restore_master.inc	06/02/16 14:23:16
######################################################
# By JBM 2006-02-16 So that the code is not repeated #
# in test cases and can be reused.                   #
######################################################

--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUS
TER_PORT" -p 8 -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP
/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT

--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUS
TER_PORT" -p 8 -b $the_backup_id -n 2  -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/B
ACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT


--- 1.1/mysql-test/t/ndb_dd_backuprestore.test	2006-02-15 14:03:48 +01:00
+++ 1.2/mysql-test/t/ndb_dd_backuprestore.test	2006-02-16 14:24:23 +01:00
@@ -45,22 +45,10 @@
 SELECT COUNT(*) FROM test.t1;
 SELECT pk1, c2, c3,  hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5;
 
---exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "start backup" >> $NDB_TOOLS_OUTPUT
+-- source include/ndb_backup.inc
 
 DROP TABLE test.t1;
 
-# there is no neat way to find the backupid, this is a hack to find it... 
---exec $NDB_TOOLS_DIR/ndb_select_all --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -d sys --delimiter=',' SYSTAB_0 | grep 520093696 > var/tmp.dat
-
-CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; 
-DELETE FROM test.backup_info; 
-
-LOAD DATA INFILE '../../var/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; 
---replace_column 1 <the_backup_id> 
-SELECT @the_backup_id:=backup_id FROM test.backup_info; 
-let the_backup_id=`select @the_backup_id`; 
-DROP TABLE test.backup_info;
-
 ALTER TABLESPACE table_space1
 DROP DATAFILE './table_space1/datafile.dat'
 ENGINE = NDB;
@@ -71,9 +59,7 @@
 DROP LOGFILE GROUP log_group1
 ENGINE =NDB;
 
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -p 8 -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT 
-
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -p 8 -b $the_backup_id -n 2  -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT 
+-- source include/ndb_restore_master.inc
 
 SELECT COUNT(*) FROM test.t1; 
 
@@ -110,28 +96,27 @@
 }
 --enable_query_log
 
---exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "start backup" >> $NDB_TOOLS_OUTPUT
-
 SELECT COUNT(*) FROM test.t1;
+
 SELECT pk1, c2, c3,  hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; 
+
 SELECT COUNT(*) FROM test.t2; 
+
 SELECT pk1, c2, c3,  hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; 
+
 SELECT COUNT(*) FROM test.t3; 
+
 SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; 
+
 SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; 
+
 SELECT COUNT(*) FROM test.t4; 
-SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; 
-SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2;
 
-# there is no neat way to find the backupid, this is a hack to find it...
---exec $NDB_TOOLS_DIR/ndb_select_all --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -d sys --delimiter=',' SYSTAB_0 | grep 520093696 > var/tmp.dat
+SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; 
 
-CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; DELETE FROM test.backup_info;
+SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2;
 
-LOAD DATA INFILE '../../var/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ',';
---replace_column 1 <the_backup_id> 
-SELECT @the_backup_id:=backup_id FROM test.backup_info; 
-let the_backup_id=`select @the_backup_id`;
+-- source include/ndb_backup.inc
 
 DROP TABLE test.backup_info;
 DROP TABLE test.t1;
@@ -149,19 +134,26 @@
 DROP LOGFILE GROUP log_group1
 ENGINE =NDB;
 
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -p 8 -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT 
-
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -p 8 -b $the_backup_id -n 2  -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+-- source include/ndb_restore_master.inc
 
 SELECT COUNT(*) FROM test.t1;
+
 SELECT pk1, c2, c3,  hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; 
+
 SELECT COUNT(*) FROM test.t2; 
+
 SELECT pk1, c2, c3,  hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; 
+
 SELECT COUNT(*) FROM test.t3; 
+
 SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; 
+
 SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; 
+
 SELECT COUNT(*) FROM test.t4; 
+
 SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; 
+
 SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2;
 
 DROP TABLE test.t1;
@@ -190,16 +182,27 @@
 CREATE TABLE test.t6 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY RANGE (pk1) PARTITIONS 2 (PARTITION x1 VALUES LESS THAN (333), PARTITION x2 VALUES LESS THAN (720));
 
 SHOW CREATE TABLE test.t1;
+
 SHOW CREATE TABLE test.t2;
+
 SHOW CREATE TABLE test.t3;
+
 SHOW CREATE TABLE test.t4;
+
 SHOW CREATE TABLE test.t5;
+
 SHOW CREATE TABLE test.t6;
+
 SELECT * FROM information_schema.partitions WHERE table_name= 't1'; 
+
 SELECT * FROM information_schema.partitions WHERE table_name= 't2'; 
+
 SELECT * FROM information_schema.partitions WHERE table_name= 't3'; 
+
 SELECT * FROM information_schema.partitions WHERE table_name= 't4'; 
+
 SELECT * FROM information_schema.partitions WHERE table_name= 't5'; 
+
 SELECT * FROM information_schema.partitions WHERE table_name= 't6';
 
 
@@ -217,31 +220,30 @@
   eval INSERT INTO test.t6 VALUES (NULL, "TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU", $j, b'1'); } --enable_query_log
 
 SELECT COUNT(*) FROM test.t1;
+
 SELECT pk1, c2, c3,  hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; 
+
 SELECT COUNT(*) FROM test.t2; 
+
 SELECT pk1, c2, c3,  hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; 
+
 SELECT COUNT(*) FROM test.t3; 
+
 SELECT pk1, c2, c3,  hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; 
+
 SELECT COUNT(*) FROM test.t4; 
+
 SELECT pk1, c2, c3,  hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; 
+
 SELECT COUNT(*) FROM test.t5; 
-SELECT pk1, c2, c3,  hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; 
-SELECT COUNT(*) FROM test.t6; 
-SELECT pk1, c2, c3,  hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5;
 
---exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "start backup" >> $NDB_TOOLS_OUTPUT
+SELECT pk1, c2, c3,  hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; 
 
-# there is no neat way to find the backupid, this is a hack to find it...
---exec $NDB_TOOLS_DIR/ndb_select_all --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -d sys --delimiter=',' SYSTAB_0 | grep 520093696 > var/tmp.dat
+SELECT COUNT(*) FROM test.t6; 
 
-CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; 
-DELETE FROM test.backup_info;
+SELECT pk1, c2, c3,  hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5;
 
-LOAD DATA INFILE '../../var/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; 
---replace_column 1 <the_backup_id> 
-SELECT @the_backup_id:=backup_id FROM test.backup_info; 
-let the_backup_id=`select @the_backup_id`; 
-DROP TABLE test.backup_info;
+-- source include/ndb_backup.inc
 
 DROP TABLE test.t1;
 DROP TABLE test.t2;
@@ -267,33 +269,55 @@
 DROP LOGFILE GROUP log_group1
 ENGINE =NDB;
 
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -p 8 -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT 
+-- source include/ndb_restore_master.inc
 
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -p 8 -b $the_backup_id -n 2  -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
 
 SHOW CREATE TABLE test.t1;
+
 SHOW CREATE TABLE test.t2;
+
 SHOW CREATE TABLE test.t3;
+
 SHOW CREATE TABLE test.t4;
+
 SHOW CREATE TABLE test.t5;
+
 SHOW CREATE TABLE test.t6;
+
 SELECT * FROM information_schema.partitions WHERE table_name= 't1'; 
+
 SELECT * FROM information_schema.partitions WHERE table_name= 't2'; 
+
 SELECT * FROM information_schema.partitions WHERE table_name= 't3'; 
+
 SELECT * FROM information_schema.partitions WHERE table_name= 't4'; 
+
 SELECT * FROM information_schema.partitions WHERE table_name= 't5'; 
+
 SELECT * FROM information_schema.partitions WHERE table_name= 't6'; 
+
 SELECT COUNT(*) FROM test.t1; 
+
 SELECT pk1, c2, c3,  hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; 
+
 SELECT COUNT(*) FROM test.t2; 
+
 SELECT pk1, c2, c3,  hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; 
+
 SELECT COUNT(*) FROM test.t3; 
+
 SELECT pk1, c2, c3,  hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; 
+
 SELECT COUNT(*) FROM test.t4; 
+
 SELECT pk1, c2, c3,  hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; 
+
 SELECT COUNT(*) FROM test.t5; 
+
 SELECT pk1, c2, c3,  hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; 
+
 SELECT COUNT(*) FROM test.t6; 
+
 SELECT pk1, c2, c3,  hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5;
 
 # Cleanup
Thread
bk commit into 5.1 tree (jmiller:1.2114)Jonathan Miller16 Feb