File: ndb_backup.inc

package info (click to toggle)
mysql-dfsg-5.0 5.0.51a-24%2Blenny5
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 106,168 kB
  • ctags: 94,516
  • sloc: cpp: 447,179; ansic: 411,410; perl: 38,307; sh: 37,449; tcl: 30,484; pascal: 14,851; yacc: 8,559; makefile: 5,078; java: 4,610; xml: 3,953; sql: 2,920; awk: 1,338; asm: 1,061; sed: 772
file content (24 lines) | stat: -rw-r--r-- 955 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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;