1# Maria helper script
2# Copies clean tables' data and index file to other directory
3# Tables are $mms_tname1...$mms_tname[$mms_tables]
4# They are later used as a reference to see if recovery works.
5
6# API:
7# set $mms_tname to a string, and $mms_tables to a number N, the script will
8# cover tables mysqltest.$mms_tname1,...$mms_tnameN
9
10connection admin;
11--source include/wait_until_connected_again.inc
12
13let $mms_table_to_use=$mms_tables;
14let $mms_purpose=comparison;
15let $mms_copy=1;
16
17--disable_query_log
18--disable_warnings
19eval drop database if exists mysqltest_for_$mms_purpose;
20--enable_warnings
21eval create database mysqltest_for_$mms_purpose;
22--enable_query_log
23
24while ($mms_table_to_use)
25{
26  # to serve as a reference, table must be in a clean state
27  eval flush table $mms_tname$mms_table_to_use;
28  -- source include/maria_make_snapshot.inc
29  dec $mms_table_to_use;
30}
31let $mms_copy=0;
32connection default;
33