| 1 |
# The general reason why innodb redo log file is limited by 512G is that |
| 2 |
# log_block_convert_lsn_to_no() returns value limited by 1G. But there is no |
| 3 |
# need to have unique log block numbers in log group. This test forces innodb |
| 4 |
# to generate redo log files with non-unique log block numbers and tests |
| 5 |
# recovery process with such numbers. |
| 6 |
--source include/have_innodb.inc |
| 7 |
--source include/have_debug.inc |
| 8 |
--source include/no_valgrind_without_big.inc |
| 9 |
|
| 10 |
--let MYSQLD_DATADIR= `select @@datadir` |
| 11 |
let $MYSQLD_BOOTSTRAP_CMD= $MYSQLD_BOOTSTRAP_CMD --datadir=$MYSQLD_DATADIR --tmpdir=$MYSQL_TMP_DIR --debug-dbug=+d,innodb_small_log_block_no_limit; |
| 12 |
|
| 13 |
--source include/kill_mysqld.inc |
| 14 |
--rmdir $MYSQLD_DATADIR |
| 15 |
--mkdir $MYSQLD_DATADIR |
| 16 |
--mkdir $MYSQLD_DATADIR/mysql |
| 17 |
--mkdir $MYSQLD_DATADIR/test |
| 18 |
--exec $MYSQLD_BOOTSTRAP_CMD < $MYSQL_BOOTSTRAP_SQL_FILE >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1 |
| 19 |
let $old_restart_parameters=$restart_parameters; |
| 20 |
let $restart_parameters= $old_restart_parameters --debug-dbug=+d,innodb_small_log_block_no_limit; |
| 21 |
--source include/start_mysqld.inc |
| 22 |
|
| 23 |
CREATE TABLE t(i INT) ENGINE InnoDB; |
| 24 |
INSERT INTO t VALUES |
| 25 |
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9), |
| 26 |
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9), |
| 27 |
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9), |
| 28 |
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9), |
| 29 |
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9), |
| 30 |
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9), |
| 31 |
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9), |
| 32 |
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9), |
| 33 |
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9), |
| 34 |
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9); |
| 35 |
|
| 36 |
set global innodb_log_checkpoint_now = 1; |
| 37 |
--let after_copy_test_t=BEGIN NOT ATOMIC INSERT INTO test.t SELECT * FROM test.t; UPDATE test.t SET i = 10 WHERE i = 0; DELETE FROM test.t WHERE i = 1; END |
| 38 |
|
| 39 |
--echo # xtrabackup backup, execute the following query after test.t is copied: |
| 40 |
--echo # $after_copy_test_t |
| 41 |
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; |
| 42 |
|
| 43 |
--disable_result_log |
| 44 |
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir --dbug=+d,mariabackup_events,innodb_small_log_block_no_limit; |
| 45 |
--enable_result_log |
| 46 |
|
| 47 |
--let $total_before=`SELECT count(*) FROM t` |
| 48 |
SELECT count(*) FROM t WHERE i = 0; |
| 49 |
--let $updated_before=`SELECT count(*) FROM t WHERE i = 10` |
| 50 |
|
| 51 |
echo # xtrabackup prepare; |
| 52 |
--disable_result_log |
| 53 |
exec $XTRABACKUP --prepare --target-dir=$targetdir --dbug=+d,innodb_small_log_block_no_limit; |
| 54 |
--source include/restart_and_restore.inc |
| 55 |
--enable_result_log |
| 56 |
|
| 57 |
--let $total_after=`SELECT count(*) FROM t` |
| 58 |
SELECT count(*) FROM t WHERE i = 0; |
| 59 |
--let $updated_after=`SELECT count(*) FROM t WHERE i = 10` |
| 60 |
|
| 61 |
if ($total_before == $total_after) { |
| 62 |
--echo Ok |
| 63 |
} |
| 64 |
if ($total_before != $total_after) { |
| 65 |
--echo Failed |
| 66 |
} |
| 67 |
if ($updated_before == $updated_after) { |
| 68 |
--echo Ok |
| 69 |
} |
| 70 |
if ($updated_before != $updated_after) { |
| 71 |
--echo Failed |
| 72 |
} |
| 73 |
|
| 74 |
DROP TABLE t; |
| 75 |
rmdir $targetdir; |
| 76 |
--source include/kill_mysqld.inc |
| 77 |
--rmdir $MYSQLD_DATADIR |
| 78 |
|
| 79 |
perl; |
| 80 |
use lib "lib"; |
| 81 |
use My::Handles { suppress_init_messages => 1 }; |
| 82 |
use My::File::Path; |
| 83 |
my $install_db_dir = ($ENV{MTR_PARALLEL} == 1) ? |
| 84 |
"$ENV{'MYSQLTEST_VARDIR'}/install.db" : |
| 85 |
"$ENV{'MYSQLTEST_VARDIR'}/../install.db"; |
| 86 |
copytree($install_db_dir, $ENV{'MYSQLD_DATADIR'}); |
| 87 |
EOF |
| 88 |
|
| 89 |
--let $restart_parameters= $old_restart_parameters |
| 90 |
--source include/start_mysqld.inc |