82 lines
2.7 KiB
Plaintext
82 lines
2.7 KiB
Plaintext
# The include statement below is a temp one for tests that are yet to
|
|
#be ported to run with InnoDB,
|
|
#but needs to be kept for tests that would need MyISAM in future.
|
|
--source include/force_myisam_default.inc
|
|
|
|
--source include/have_ndb.inc
|
|
--source include/not_embedded.inc
|
|
--source suite/ndb/include/have_little_endian.inc
|
|
|
|
--disable_warnings
|
|
drop table if exists t1;
|
|
--enable_warnings
|
|
|
|
# test ndb_restore between old types and new types of precision 0
|
|
# uses table definition and data from wl_946_pre.test
|
|
|
|
select @@session.time_zone;
|
|
set time_zone = '+00:00';
|
|
select @@session.time_zone;
|
|
|
|
--echo # create table prec 0
|
|
--let $prec=
|
|
--let $frac=
|
|
--source ndb_wl946_create.inc
|
|
show create table t1;
|
|
--source show_attributes.inc
|
|
--source show_indexes.inc
|
|
|
|
--echo # test defaults
|
|
insert into t1 (a) values (0);
|
|
select * from t1;
|
|
delete from t1;
|
|
|
|
--echo # restore data from wl946_pre with promote
|
|
--exec $NDB_RESTORE --no-defaults -b 1 -n 1 -r --promote-attributes $MYSQL_TEST_DIR/suite/ndb/backups/wl946_pre >> $NDB_TOOLS_OUTPUT
|
|
--exec $NDB_RESTORE --no-defaults -b 1 -n 2 -r --promote-attributes $MYSQL_TEST_DIR/suite/ndb/backups/wl946_pre >> $NDB_TOOLS_OUTPUT
|
|
|
|
--echo # check contents
|
|
select count(*), sum(crc32(concat(a,b,c,d,e,f))) from t1;
|
|
|
|
--echo # run backup
|
|
--source include/ndb_backup.inc
|
|
|
|
--echo # drop table
|
|
drop table t1;
|
|
|
|
--echo # restore meta from backup
|
|
--exec $NDB_RESTORE --no-defaults -b $the_backup_id -n 1 -m --print-meta $NDB_BACKUPS-$the_backup_id >> $NDB_TOOLS_OUTPUT
|
|
show create table t1;
|
|
--source show_attributes.inc
|
|
--source show_indexes.inc
|
|
|
|
--echo # restore data from backup
|
|
--exec $NDB_RESTORE --no-defaults -b $the_backup_id -n 1 -r $NDB_BACKUPS-$the_backup_id >> $NDB_TOOLS_OUTPUT
|
|
--exec $NDB_RESTORE --no-defaults -b $the_backup_id -n 2 -r $NDB_BACKUPS-$the_backup_id >> $NDB_TOOLS_OUTPUT
|
|
|
|
--echo # check contents
|
|
select count(*), sum(crc32(concat(a,b,c,d,e,f))) from t1;
|
|
|
|
--echo # drop table
|
|
drop table t1;
|
|
|
|
# restore table with old types
|
|
--echo # restore meta wl946_pre
|
|
--exec $NDB_RESTORE --no-defaults -b 1 -n 1 -m --print-meta $MYSQL_TEST_DIR/suite/ndb/backups/wl946_pre >> $NDB_TOOLS_OUTPUT
|
|
# datetime,timestamp default wrong on solaris (probably bug#53818)
|
|
# show create table t1;
|
|
--source show_attributes.inc
|
|
--source show_indexes.inc
|
|
|
|
--echo # restore data from backup with demote
|
|
--exec $NDB_RESTORE --no-defaults -b $the_backup_id -n 1 -r --promote-attributes $NDB_BACKUPS-$the_backup_id >> $NDB_TOOLS_OUTPUT
|
|
--exec $NDB_RESTORE --no-defaults -b $the_backup_id -n 2 -r --promote-attributes $NDB_BACKUPS-$the_backup_id >> $NDB_TOOLS_OUTPUT
|
|
|
|
--echo # check contents
|
|
select count(*), sum(crc32(concat(a,b,c,d,e,f))) from t1;
|
|
|
|
set time_zone = default;
|
|
select @@session.time_zone;
|
|
|
|
drop table t1;
|