2
# Copies table' data and index file to other directory, or back, or compares.
3
# The other directory looks like a database directory, so that we can
4
# read copies from inside mysqld, that's also why we copy the frm.
6
# "mms" is a namespace for Maria_Make_Snapshot
10
# $mms_copy : to copy table from database to spare directory
11
# $mms_reverse : to copy it back
12
# $mms_compare_physically : to compare both byte-for-byte
13
# 2) set $mms_tname to a string and set $mms_table_to_use to a number: tables
14
# will be mysqltest.$mms_tname$mms_table_to_use.
15
# 3) set $mms_purpose to say what this copy is for (influences the naming
16
# of the spare directory).
20
--echo * copied $mms_tname$mms_table_to_use for $mms_purpose
21
copy_file $MYSQLTEST_VARDIR/master-data/mysqltest/$mms_tname$mms_table_to_use.MAD $MYSQLTEST_VARDIR/master-data/mysqltest_for_$mms_purpose/$mms_tname$mms_table_to_use.MAD;
22
copy_file $MYSQLTEST_VARDIR/master-data/mysqltest/$mms_tname$mms_table_to_use.MAI $MYSQLTEST_VARDIR/master-data/mysqltest_for_$mms_purpose/$mms_tname$mms_table_to_use.MAI;
23
copy_file $MYSQLTEST_VARDIR/master-data/mysqltest/$mms_tname$mms_table_to_use.frm $MYSQLTEST_VARDIR/master-data/mysqltest_for_$mms_purpose/$mms_tname$mms_table_to_use.frm;
26
if ($mms_reverse_copy)
28
# do not call this without flushing target table first!
29
--echo * copied $mms_tname$mms_table_to_use back for $mms_purpose
31
remove_file $MYSQLTEST_VARDIR/master-data/mysqltest/$mms_tname$mms_table_to_use.MAD;
32
copy_file $MYSQLTEST_VARDIR/master-data/mysqltest_for_$mms_purpose/$mms_tname$mms_table_to_use.MAD $MYSQLTEST_VARDIR/master-data/mysqltest/$mms_tname$mms_table_to_use.MAD;
34
remove_file $MYSQLTEST_VARDIR/master-data/mysqltest/$mms_tname$mms_table_to_use.MAI;
35
copy_file $MYSQLTEST_VARDIR/master-data/mysqltest_for_$mms_purpose/$mms_tname$mms_table_to_use.MAI $MYSQLTEST_VARDIR/master-data/mysqltest/$mms_tname$mms_table_to_use.MAI;
38
if ($mms_compare_physically)
40
# After the UNDO phase this is normally impossible
41
# (UNDO execution has created new log records => pages have new LSNs).
42
# So, do this only when testing REDO phase.
43
# If UNDO phase, we nevertheless compare checksums
44
# (see maria_verify_recovery.inc).
45
--echo * compared $mms_tname$mms_table_to_use to old version
46
diff_files $MYSQLTEST_VARDIR/master-data/mysqltest/$mms_tname$mms_table_to_use.MAD $MYSQLTEST_VARDIR/master-data/mysqltest_for_$mms_purpose/$mms_tname$mms_table_to_use.MAD;
47
# index file not yet recovered
48
# diff_files $MYSQLTEST_VARDIR/master-data/mysqltest/$mms_tname$mms_table_to_use.MAI $MYSQLTEST_VARDIR/master-data/mysqltest_for_$mms_purpose/$mms_tname$mms_table_to_use.MAI;