diff options
author | tomas@poseidon.mysql.com <> | 2007-03-09 00:55:46 +0700 |
---|---|---|
committer | tomas@poseidon.mysql.com <> | 2007-03-09 00:55:46 +0700 |
commit | cb4e5fbe00437c9d27ce50272614cc23edbada73 (patch) | |
tree | e2c451c8a5be685cf1ff69ad5b7fe75df34bf2b6 /mysql-test/include | |
parent | 46c2981e0532644eebda0ead67aa146194a2b632 (diff) | |
parent | 30c58170fd627da7d37af95a08f509cc9c692efe (diff) | |
download | mariadb-git-cb4e5fbe00437c9d27ce50272614cc23edbada73.tar.gz |
Merge poseidon.mysql.com:/home/tomas/mysql-5.0-telco-gca-ndb_restore
into poseidon.mysql.com:/home/tomas/mysql-5.0-ndb
Diffstat (limited to 'mysql-test/include')
-rw-r--r-- | mysql-test/include/ndb_backup.inc | 24 | ||||
-rw-r--r-- | mysql-test/include/ndb_backup_print.inc | 6 |
2 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/include/ndb_backup.inc b/mysql-test/include/ndb_backup.inc new file mode 100644 index 00000000000..f0a883d4e11 --- /dev/null +++ b/mysql-test/include/ndb_backup.inc @@ -0,0 +1,24 @@ +###################################################### +# 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 "start 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 > $MYSQLTEST_VARDIR/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 '../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; + diff --git a/mysql-test/include/ndb_backup_print.inc b/mysql-test/include/ndb_backup_print.inc new file mode 100644 index 00000000000..57fb279491c --- /dev/null +++ b/mysql-test/include/ndb_backup_print.inc @@ -0,0 +1,6 @@ +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults $ndb_restore_opts -b $the_backup_id -n 1 $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id $ndb_restore_filter > $MYSQLTEST_VARDIR/tmp/tmp.dat +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults $ndb_restore_opts -b $the_backup_id -n 2 $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id $ndb_restore_filter >> $MYSQLTEST_VARDIR/tmp/tmp.dat +--exec sort $MYSQLTEST_VARDIR/tmp/tmp.dat +--exec rm -f $MYSQLTEST_VARDIR/tmp/tmp.dat +--let ndb_restore_opts= +--let ndb_restore_filter= |