mariadb/mysql-test/t/ndb_restore_compat.test
unknown 261136c090 ndb: break out ndb backup compatability test, so that it can be disabled on mac
mysql-test/include/have_case_sensitive_file_system.inc:
  New BitKeeper file ``mysql-test/include/have_case_sensitive_file_system.inc''
mysql-test/r/case_sensitive_file_system.require:
  New BitKeeper file ``mysql-test/r/case_sensitive_file_system.require''
mysql-test/r/ndb_restore_compat.result:
  New BitKeeper file ``mysql-test/r/ndb_restore_compat.result''
mysql-test/t/ndb_restore_compat.test:
  New BitKeeper file ``mysql-test/t/ndb_restore_compat.test''
2006-04-26 01:11:40 +02:00

43 lines
1.7 KiB
Text

-- source include/have_ndb.inc
-- source include/not_embedded.inc
-- source include/have_case_sensitive_file_system.inc
# This test currently requires case sensitive file system as the tables
# are originally stored with uppercase
#
# Bug #18594 ndb_restore log boken in 5.1
#
--disable_warnings
DROP DATABASE IF EXISTS BANK;
--enable_warnings
CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin;
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 -e -b 1 -n 2 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup51 >> $NDB_TOOLS_OUTPUT
SHOW TABLES;
SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE;
SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID;
SELECT COUNT(*) FROM TRANSACTION;
SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID;
SELECT * FROM cluster.apply_status WHERE server_id=0;
#
# verify restore of 5.0 backup
# here we must use the already created tables as restoring the old
# table definitions will not work
#
TRUNCATE GL;
TRUNCATE ACCOUNT;
TRUNCATE TRANSACTION;
TRUNCATE SYSTEM_VALUES;
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 -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 ACCOUNT ORDER BY ACCOUNT_ID;
SELECT COUNT(*) FROM TRANSACTION;
SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID;
SELECT * FROM cluster.apply_status WHERE server_id=0;
DROP DATABASE BANK;