Debian Codegraph @

mysql-test/suite/innodb/t/check_table.test

raw
1 ##########################################################################
2 # Test script to test CHECK TABLE
3 ##########################################################################
4
5 --source include/not_valgrind.inc
6 --source include/have_lowercase0.inc
7 --source include/have_nodebug.inc
8
9 --echo #########
10 --echo # SETUP #
11 --echo #########
12
13 # ------------------------------------------------------------
14 # datadir is created as following
15 #
16 # on 8.0.28
17 # Create table t1 (c1 varchar(10));
18 # Alter table t1 add column c2 varchar(10) default "def_c2", algorithm=instant;
19 # Alter table t1 add column c3 varchar(10) default "def_c3", algorithm=instant;
20 # Insert into t1 values ("r1c1", "r1c2", "r1c3");
21 # Insert into t1 values ("r2c1", "r2c2", "r2c3");
22 #
23 # <UPGRADE to 8.0.31>
24 #
25 # on 8.0.31
26 # Insert into t1 values ("r3c1", "r3c2", "def_c3");
27 # Start transaction;
28 # Update t1 set c1="r3331c1" where c1="r3c1";
29 # Rollback;
30 # ------------------------------------------------------------
31
32 --disable_query_log
33 call mtr.add_suppression("Record has both instant and version bit set");
34 call mtr.add_suppression("Apparent corruption in space .* page .* index `GEN_CLUST_INDEX`");
35 call mtr.add_suppression("In page .* of index `GEN_CLUST_INDEX` of table");
36 --enable_query_log
37
38 --echo # Stop the running the server
39 --source include/shutdown_mysqld.inc
40
41 --echo # Copy and unzip the datadir.
42 --copy_file $MYSQLTEST_VARDIR/std_data/instant_ddl/check_table.zip $MYSQL_TMP_DIR/check_table.zip
43 --file_exists $MYSQL_TMP_DIR/check_table.zip
44 --exec unzip -qo $MYSQL_TMP_DIR/check_table.zip -d $MYSQL_TMP_DIR
45 let $DATADIR = $MYSQL_TMP_DIR/data;
46
47 --echo # Restart the server against the unzipped datadir
48 --let LOG_FILE= $MYSQLTEST_VARDIR/log/my_restart.err
49 --replace_result $DATADIR DATADIR $LOG_FILE LOG_FILE
50 --let $restart_parameters = restart: --datadir=$DATADIR --innodb-page-size=16k --log-error=$LOG_FILE
51 --let $wait_counter=3000
52 --source include/start_mysqld.inc
53
54 SHOW CREATE TABLE t1;
55
56 CHECK TABLE t1;
57
58 --let SEARCH_FILE= $LOG_FILE
59 --echo # Expect found
60 --let SEARCH_PATTERN= Record has both instant and version bit set
61 --source include/search_pattern.inc
62
63 --echo ###########
64 --echo # CLEANUP #
65 --echo ###########
66
67 --echo # Shutdown server
68 --source include/shutdown_mysqld.inc
69
70 --echo # Remove copied files
71 --file_exists $MYSQL_TMP_DIR/check_table.zip
72 --force-rmdir $MYSQL_TMP_DIR/data
73 --remove_file $MYSQL_TMP_DIR/check_table.zip
74 --remove_file $LOG_FILE
75
76 --echo # Restarting server to restore server state
77 let $restart_parameters =;
78 --source include/start_mysqld.inc