Bug #18935 restore of apply_status table fails using old ndb backup

parent c7ebfcdd
...@@ -528,6 +528,9 @@ SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; ...@@ -528,6 +528,9 @@ SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID;
SYSTEM_VALUES_ID VALUE SYSTEM_VALUES_ID VALUE
0 4767 0 4767
1 6 1 6
SELECT * FROM cluster.apply_status WHERE server_id=0;
server_id epoch
0 314
TRUNCATE GL; TRUNCATE GL;
TRUNCATE ACCOUNT; TRUNCATE ACCOUNT;
TRUNCATE TRANSACTION; TRUNCATE TRANSACTION;
...@@ -579,4 +582,7 @@ SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; ...@@ -579,4 +582,7 @@ SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID;
SYSTEM_VALUES_ID VALUE SYSTEM_VALUES_ID VALUE
0 2297 0 2297
1 5 1 5
SELECT * FROM cluster.apply_status WHERE server_id=0;
server_id epoch
0 331
DROP DATABASE BANK; DROP DATABASE BANK;
...@@ -384,12 +384,13 @@ DROP DATABASE IF EXISTS BANK; ...@@ -384,12 +384,13 @@ DROP DATABASE IF EXISTS BANK;
CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin; CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin;
USE BANK; USE BANK;
--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 1 -p 1 -m -r $MYSQL_TEST_DIR/std_data/ndb_backup51 >> $NDB_TOOLS_OUTPUT --exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 1 -p 1 -m -r $MYSQL_TEST_DIR/std_data/ndb_backup51 >> $NDB_TOOLS_OUTPUT
--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 2 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup51 >> $NDB_TOOLS_OUTPUT --exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -e -b 1 -n 2 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup51 >> $NDB_TOOLS_OUTPUT
SHOW TABLES; SHOW TABLES;
SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE; SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE;
SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID;
SELECT COUNT(*) FROM TRANSACTION; SELECT COUNT(*) FROM TRANSACTION;
SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID;
SELECT * FROM cluster.apply_status WHERE server_id=0;
# #
# verify restore of 5.0 backup # verify restore of 5.0 backup
...@@ -402,9 +403,10 @@ TRUNCATE TRANSACTION; ...@@ -402,9 +403,10 @@ TRUNCATE TRANSACTION;
TRUNCATE SYSTEM_VALUES; TRUNCATE SYSTEM_VALUES;
TRUNCATE ACCOUNT_TYPE; TRUNCATE ACCOUNT_TYPE;
--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 1 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT --exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 1 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT
--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 2 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT --exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -e -b 1 -n 2 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT
SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE; SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE;
SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID;
SELECT COUNT(*) FROM TRANSACTION; SELECT COUNT(*) FROM TRANSACTION;
SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID;
SELECT * FROM cluster.apply_status WHERE server_id=0;
DROP DATABASE BANK; DROP DATABASE BANK;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment