1
######################################################
2
# By JBM 2006-02-16 So that the code is not repeated #
3
# in test cases and can be reused. #
4
######################################################
5
--exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "start backup" >> $NDB_TOOLS_OUTPUT
7
# there is no neat way to find the backupid, this is a hack to find it...
9
--exec $NDB_TOOLS_DIR/ndb_select_all --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -d sys --delimiter=',' SYSTAB_0 | grep 520093696 > $MYSQLTEST_VARDIR/tmp.dat
11
CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP;
13
DELETE FROM test.backup_info;
15
LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ',';
17
--replace_column 1 <the_backup_id>
19
SELECT @the_backup_id:=backup_id FROM test.backup_info;
21
let the_backup_id=`select @the_backup_id`;
23
DROP TABLE test.backup_info;