89 changed files with 1850 additions and 1359 deletions
-
265mysql-test/lib/My/Debugger.pm
-
15mysql-test/main/default.result
-
19mysql-test/main/default.test
-
22mysql-test/main/flush_and_binlog.result
-
29mysql-test/main/flush_and_binlog.test
-
13mysql-test/main/information_schema.result
-
10mysql-test/main/information_schema.test
-
19mysql-test/main/innodb_ext_key.result
-
23mysql-test/main/innodb_ext_key.test
-
2mysql-test/main/lock_user.result
-
5mysql-test/main/password_expiration.result
-
12mysql-test/main/ps.result
-
10mysql-test/main/ps.test
-
58mysql-test/main/selectivity.result
-
45mysql-test/main/selectivity.test
-
58mysql-test/main/selectivity_innodb.result
-
10mysql-test/main/subselect4.result
-
16mysql-test/main/subselect4.test
-
1mysql-test/main/system_mysql_db_507.result
-
101mysql-test/main/table_value_constr.result
-
58mysql-test/main/table_value_constr.test
-
89mysql-test/main/type_decimal.result
-
44mysql-test/main/type_decimal.test
-
15mysql-test/main/view.result
-
16mysql-test/main/view.test
-
791mysql-test/mysql-test-run.pl
-
280mysql-test/suite/binlog/include/binlog_xa_recover.inc
-
17mysql-test/suite/binlog/r/binlog_xa_recover.result
-
0mysql-test/suite/binlog/t/binlog_xa_recover.opt
-
277mysql-test/suite/binlog/t/binlog_xa_recover.test
-
1mysql-test/suite/binlog_encryption/binlog_xa_recover-master.opt
-
18mysql-test/suite/binlog_encryption/binlog_xa_recover.result
-
2mysql-test/suite/binlog_encryption/binlog_xa_recover.test
-
17mysql-test/suite/engines/iuds/r/insert_decimal.result
-
2mysql-test/suite/galera/disabled.def
-
2mysql-test/suite/galera/r/galera_kill_nochanges.result
-
4mysql-test/suite/galera/r/galera_split_brain.result
-
9mysql-test/suite/galera/r/galera_ssl_upgrade.result
-
11mysql-test/suite/galera/r/galera_truncate.result
-
10mysql-test/suite/galera/r/galera_var_wsrep_provider_options.result
-
6mysql-test/suite/galera/t/galera_split_brain.test
-
4mysql-test/suite/galera/t/galera_ssl_upgrade.cnf
-
18mysql-test/suite/galera/t/galera_ssl_upgrade.test
-
20mysql-test/suite/galera/t/galera_truncate.test
-
11mysql-test/suite/galera/t/galera_var_wsrep_provider_options.test
-
1mysql-test/suite/galera_3nodes/disabled.def
-
10mysql-test/suite/innodb/r/alter_large_dml.result
-
24mysql-test/suite/innodb/r/alter_table.result
-
11mysql-test/suite/innodb/r/alter_varchar_change.result
-
10mysql-test/suite/innodb/t/alter_large_dml.test
-
27mysql-test/suite/innodb/t/alter_table.test
-
12mysql-test/suite/innodb/t/alter_varchar_change.test
-
1mysql-test/suite/innodb/t/innodb_bug60049-master.opt
-
49mysql-test/suite/innodb/t/innodb_bug60049.test
-
6mysql-test/suite/innodb_gis/t/rtree_purge.test
-
4mysql-test/suite/rpl/r/rpl_change_master.result
-
7mysql-test/suite/rpl/t/rpl_change_master.test
-
9mysql-test/suite/wsrep/r/variables.result
-
3mysql-test/suite/wsrep/t/variables.test
-
5sql/item.cc
-
28sql/item_subselect.cc
-
3sql/item_subselect.h
-
17sql/lock.cc
-
5sql/log.cc
-
3sql/signal_handler.cc
-
42sql/sql_acl.cc
-
4sql/sql_admin.cc
-
2sql/sql_lex.h
-
33sql/sql_select.cc
-
10sql/sql_show.cc
-
93sql/sql_statistics.cc
-
11sql/sql_statistics.h
-
23sql/sql_truncate.cc
-
27sql/sql_tvc.cc
-
18sql/sql_update.cc
-
2sql/structs.h
-
4sql/table.cc
-
2sql/table.h
-
17sql/wsrep_mysqld.cc
-
2sql/wsrep_mysqld.h
-
62sql/wsrep_sst.cc
-
20sql/wsrep_var.cc
-
35storage/innobase/btr/btr0sea.cc
-
34storage/innobase/handler/handler0alter.cc
-
2storage/rocksdb/mysql-test/rocksdb/r/issue896.result
-
6storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result
-
5storage/tokudb/mysql-test/tokudb/r/type_decimal.result
-
63strings/decimal.c
-
2win/packaging/heidisql.cmake
@ -0,0 +1,265 @@ |
|||
package My::Debugger; |
|||
|
|||
use strict; |
|||
use warnings; |
|||
use Text::Wrap; |
|||
use Cwd; |
|||
use My::Platform; |
|||
|
|||
# 1. options to support: |
|||
# --xxx[=ARGS] |
|||
# --manual-xxx[=ARGS] |
|||
# --client-xxx[=ARGS] |
|||
# --boot-xxx[=ARGS] |
|||
# TODO --manual-client-xxx[=ARGS] |
|||
# TODO --manual-boot-xxx[=ARGS] |
|||
# TODO --exec-xxx[=ARGS] (for $ENV{MYSQL}, etc) |
|||
# |
|||
# ARGS is a semicolon-separated list of commands for the |
|||
# command file. If the first command starts from '-' it'll |
|||
# be for a command line, not for a command file. |
|||
# |
|||
# 2. terminal to use: xterm |
|||
# TODO MTR_TERM="xterm -title {title} -e {command}" |
|||
# |
|||
# 3. debugger combinations are *not allowed* |
|||
# (thus no --valgrind --gdb) |
|||
# |
|||
# 4. variables for the command line / file templates: |
|||
# {vardir} -> vardir |
|||
# {exe} -> /path/to/binary/to/execute |
|||
# {args} -> command-line arguments, "-quoted |
|||
# {input} |
|||
# {type} -> client, mysqld.1, etc |
|||
# {script} -> vardir/tmp/{debugger}init.$type |
|||
# {log} -> vardir/log/$type.{debugger} |
|||
# {options} -> user options for the debugger. |
|||
# |
|||
# if {options} isn't used, they're auto-placed before {exe} |
|||
# or at the end if no {exe} |
|||
|
|||
my %debuggers = ( |
|||
gdb => { |
|||
term => 1, |
|||
options => '-x {script} {exe}', |
|||
script => 'set args {args} < {input}', |
|||
}, |
|||
ddd => { |
|||
options => '--command {script} {exe}', |
|||
script => 'set args {args} < {input}', |
|||
}, |
|||
dbx => { |
|||
term => 1, |
|||
options => '-c "stop in main; run {exe} {args} < {input}"', |
|||
}, |
|||
devenv => { |
|||
options => '/debugexe {exe} {args}', |
|||
}, |
|||
windbg => { |
|||
options => '{exe} {args}', |
|||
}, |
|||
lldb => { |
|||
term => 1, |
|||
options => '-s {script} {exe}', |
|||
script => 'process launch --stop-at-entry {args}', |
|||
}, |
|||
valgrind => { |
|||
options => '--tool=memcheck --show-reachable=yes --leak-check=yes --num-callers=16 --quiet --suppressions='.cwd().'/valgrind.supp {exe} {args} --loose-wait-for-pos-timeout=1500', |
|||
pre => sub { |
|||
my $debug_libraries_path= "/usr/lib/debug"; |
|||
$ENV{LD_LIBRARY_PATH} .= ":$debug_libraries_path" if -d $debug_libraries_path; |
|||
} |
|||
}, |
|||
strace => { |
|||
options => '-f -o {log} {exe} {args}', |
|||
}, |
|||
rr => { |
|||
options => 'record -o {log} {exe} {args}', |
|||
pre => sub { |
|||
::mtr_error('rr requires kernel.perf_event_paranoid <= 1') |
|||
if ::mtr_grab_file('/proc/sys/kernel/perf_event_paranoid') > 1; |
|||
} |
|||
}, |
|||
valgdb => { |
|||
term => 1, |
|||
run => 'gdb', |
|||
options => '-x {script} {exe}', |
|||
script => <<EEE, |
|||
py |
|||
import subprocess,shlex,time |
|||
valg=subprocess.Popen(shlex.split("""valgrind --tool=memcheck --show-reachable=yes --leak-check=yes --num-callers=16 --quiet --suppressions=valgrind.supp --vgdb-error=0 {exe} {args} --loose-wait-for-pos-timeout=1500""")) |
|||
time.sleep(2) |
|||
gdb.execute("target remote | /usr/lib64/valgrind/../../bin/vgdb --pid=" + str(valg.pid)) |
|||
EEE |
|||
pre => sub { |
|||
my $debug_libraries_path= "/usr/lib/debug"; |
|||
$ENV{LD_LIBRARY_PATH} .= ":$debug_libraries_path" if -d $debug_libraries_path; |
|||
} |
|||
}, |
|||
|
|||
# aliases |
|||
vsjitdebugger => 'windbg', |
|||
ktrace => 'strace', |
|||
); |
|||
|
|||
my %opts; |
|||
my %opt_vals; |
|||
my $help = "\n\nOptions for running debuggers\n\n"; |
|||
|
|||
for my $k (sort keys %debuggers) { |
|||
my $v = $debuggers{$k}; |
|||
$v = $debuggers{$k} = $debuggers{$v} if not ref $v; # resolve aliases |
|||
|
|||
sub register_opt($$) { |
|||
my ($name, $msg) = @_; |
|||
$opts{"$name=s"} = \$opt_vals{$name}; |
|||
$help .= wrap(sprintf(" %-23s", $name), ' 'x25, "$msg under $name\n"); |
|||
} |
|||
|
|||
$v->{script} = '' unless $v->{script}; |
|||
$v->{options} =~ s/(\{exe\}|$)/ {options} $&/ unless $v->{options} =~ /\{options\}/; |
|||
|
|||
register_opt "$k" => "Start mariadbd"; |
|||
register_opt "client-$k" => "Start mariadb-test client"; |
|||
register_opt "boot-$k" => "Start bootstrap server"; |
|||
register_opt "manual-$k" => "Before running test(s) let user manually start mariadbd"; |
|||
} |
|||
|
|||
sub subst($%) { |
|||
use warnings FATAL => 'uninitialized'; |
|||
my ($templ, %vars) = @_; |
|||
$templ =~ s/\{(\w+)\}/$vars{$1}/g; |
|||
$templ; |
|||
} |
|||
|
|||
sub do_args($$$$$) { |
|||
my ($args, $exe, $input, $type, $opt) = @_; |
|||
my $k = $opt =~ /^(?:client|boot|manual)-(.*)$/ ? $1 : $opt; |
|||
my $v = $debuggers{$k}; |
|||
|
|||
# on windows mtr args are quoted (for system), otherwise not (for exec) |
|||
sub quote($) { $_[0] =~ / / ? "\"$_[0]\"" : $_[0] } |
|||
sub unquote($) { $_[0] =~ s/^"(.*)"$/$1/; $_[0] } |
|||
sub quote_from_mtr($) { IS_WINDOWS() ? $_[0] : quote($_[0]) } |
|||
sub unquote_for_mtr($) { IS_WINDOWS() ? $_[0] : unquote($_[0]) } |
|||
|
|||
my %vars = ( |
|||
vardir => $::opt_vardir, |
|||
exe => $$exe, |
|||
args => join(' ', map { quote_from_mtr $_ } @$$args, '--gdb'), |
|||
input => $input, |
|||
script => "$::opt_vardir/tmp/${k}init.$type", |
|||
log => "$::opt_vardir/log/$type.$k", |
|||
options => '', |
|||
); |
|||
my @params = split /;/, $opt_vals{$opt}; |
|||
$vars{options} = shift @params if @params and $params[0] =~ /^-/; |
|||
|
|||
my $script = join "\n", @params; |
|||
if ($v->{script}) { |
|||
::mtr_tofile($vars{script}, subst($v->{script}, %vars)."\n".$script); |
|||
} elsif ($script) { |
|||
die "$k is not using a script file, nowhere to write the script \n---\n$script\n---\n"; |
|||
} |
|||
|
|||
my $options = subst($v->{options}, %vars); |
|||
@$$args = map { unquote_for_mtr $_ } $options =~ /("[^"]+"|\S+)/g; |
|||
my $run = $v->{run} || $k; |
|||
|
|||
if ($opt =~ /^manual-/) { |
|||
print "\nTo start $k for $type, type in another window:\n"; |
|||
print "$run $options\n"; |
|||
$$exe= undef; # Indicate the exe should not be started |
|||
} elsif ($v->{term}) { |
|||
unshift @$$args, '-title', $type, '-e', $run; |
|||
$$exe = 'xterm'; |
|||
} else { |
|||
$$exe = $run; |
|||
} |
|||
} |
|||
|
|||
sub options() { %opts } |
|||
sub help() { $help } |
|||
|
|||
sub fix_options(@) { |
|||
my $re=join '|', keys %opts; |
|||
$re =~ s/=s//g; |
|||
map { $_ . (/^--($re)$/ and '=;') } @_; |
|||
} |
|||
|
|||
sub pre_setup() { |
|||
my $used; |
|||
for my $k (keys %debuggers) { |
|||
for my $opt ($k, "manual-$k", "boot-$k", "client-$k") { |
|||
if ($opt_vals{$opt}) |
|||
{ |
|||
$used = 1; |
|||
if ($debuggers{$k}->{pre}) { |
|||
$debuggers{$k}->{pre}->(); |
|||
delete $debuggers{$k}->{pre}; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
if ($used) { |
|||
$ENV{ASAN_OPTIONS}= 'abort_on_error=1:'.($ENV{ASAN_OPTIONS} || ''); |
|||
::mtr_error("Can't use --extern when using debugger") if $ENV{USE_RUNNING_SERVER}; |
|||
|
|||
$::opt_retry= 1; |
|||
$::opt_retry_failure= 1; |
|||
$::opt_testcase_timeout= 7 * 24 * 60; # in minutes |
|||
$::opt_suite_timeout= 7 * 24 * 60; # in minutes |
|||
$::opt_shutdown_timeout= 24 * 60 *60; # in seconds |
|||
$::opt_start_timeout= 24 * 60 * 60; # in seconds |
|||
} |
|||
} |
|||
|
|||
sub setup_boot_args($$$) { |
|||
my ($args, $exe, $input) = @_; |
|||
my $found; |
|||
|
|||
for my $k (keys %debuggers) { |
|||
if ($opt_vals{"boot-$k"}) { |
|||
die "--boot-$k and --$found cannot be used at the same time\n" if $found; |
|||
|
|||
$found="boot-$k"; |
|||
do_args($args, $exe, $input, 'bootstrap', $found); |
|||
} |
|||
} |
|||
} |
|||
|
|||
sub setup_client_args($$) { |
|||
my ($args, $exe) = @_; |
|||
my $found; |
|||
my $embedded = $::opt_embedded_server ? ' with --embedded' : ''; |
|||
|
|||
for my $k (keys %debuggers) { |
|||
my @opt_names=("client-$k"); |
|||
push @opt_names, $k if $embedded; |
|||
for my $opt (@opt_names) { |
|||
if ($opt_vals{$opt}) { |
|||
die "--$opt and --$found cannot be used at the same time$embedded\n" if $found; |
|||
$found=$opt; |
|||
do_args($args, $exe, IS_WINDOWS() ? 'NUL' : '/dev/null', 'client', $found); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
sub setup_args($$$) { |
|||
my ($args, $exe, $type) = @_; |
|||
my $found; |
|||
|
|||
for my $k (keys %debuggers) { |
|||
for my $opt ($k, "manual-$k") { |
|||
if ($opt_vals{$opt}) { |
|||
die "--$opt and --$found cannot be used at the same time\n" if $found; |
|||
$found=$opt; |
|||
do_args($args, $exe, IS_WINDOWS() ? 'NUL' : '/dev/null', $type, $found); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
1; |
@ -0,0 +1,22 @@ |
|||
# |
|||
# MDEV-23843 Assertions in Diagnostics_area upon table operations under |
|||
# FTWRL |
|||
# |
|||
CREATE TABLE t1 (a INT); |
|||
FLUSH TABLES WITH READ LOCK; |
|||
connect con1,localhost,root,,; |
|||
SET lock_wait_timeout= 1; |
|||
OPTIMIZE TABLE t1; |
|||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction |
|||
disconnect con1; |
|||
connection default; |
|||
UNLOCK TABLES; |
|||
DROP TABLE t1; |
|||
FLUSH TABLES WITH READ LOCK; |
|||
connect con1,localhost,root,,test; |
|||
SET lock_wait_timeout= 1; |
|||
FLUSH TABLES; |
|||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction |
|||
connection default; |
|||
disconnect con1; |
|||
unlock tables; |
@ -0,0 +1,29 @@ |
|||
--source include/have_log_bin.inc |
|||
|
|||
--echo # |
|||
--echo # MDEV-23843 Assertions in Diagnostics_area upon table operations under |
|||
--echo # FTWRL |
|||
--echo # |
|||
|
|||
CREATE TABLE t1 (a INT); |
|||
FLUSH TABLES WITH READ LOCK; |
|||
--connect (con1,localhost,root,,) |
|||
SET lock_wait_timeout= 1; |
|||
--error ER_LOCK_WAIT_TIMEOUT |
|||
OPTIMIZE TABLE t1; |
|||
# Cleanup |
|||
--disconnect con1 |
|||
--connection default |
|||
UNLOCK TABLES; |
|||
DROP TABLE t1; |
|||
# |
|||
# Second test case from MDEV_23843 |
|||
# |
|||
FLUSH TABLES WITH READ LOCK; |
|||
--connect (con1,localhost,root,,test) |
|||
SET lock_wait_timeout= 1; |
|||
--error ER_LOCK_WAIT_TIMEOUT |
|||
FLUSH TABLES; |
|||
--connection default |
|||
--disconnect con1 |
|||
unlock tables; |
791
mysql-test/mysql-test-run.pl
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,280 +0,0 @@ |
|||
# |
|||
# This include file is used by more than one test suite |
|||
# (currently binlog and binlog_encryption). |
|||
# Please check all dependent tests after modifying it |
|||
# |
|||
|
|||
--source include/have_innodb.inc |
|||
--source include/have_debug.inc |
|||
--source include/have_debug_sync.inc |
|||
--source include/have_binlog_format_row.inc |
|||
# Valgrind does not work well with test that crashes the server |
|||
--source include/not_valgrind.inc |
|||
|
|||
# (We do not need to restore these settings, as we crash the server). |
|||
SET GLOBAL max_binlog_size= 4096; |
|||
SET GLOBAL innodb_flush_log_at_trx_commit= 1; |
|||
RESET MASTER; |
|||
|
|||
CREATE TABLE t1 (a INT PRIMARY KEY, b MEDIUMTEXT) ENGINE=Innodb; |
|||
# Insert some data to force a couple binlog rotations (3), so we get some |
|||
# normal binlog checkpoints before starting the test. |
|||
INSERT INTO t1 VALUES (100, REPEAT("x", 4100)); |
|||
# Wait for the master-bin.000002 binlog checkpoint to appear. |
|||
--let $wait_for_all= 0 |
|||
--let $show_statement= SHOW BINLOG EVENTS IN "master-bin.000002" |
|||
--let $field= Info |
|||
--let $condition= = "master-bin.000002" |
|||
--source include/wait_show_condition.inc |
|||
INSERT INTO t1 VALUES (101, REPEAT("x", 4100)); |
|||
--let $wait_for_all= 0 |
|||
--let $show_statement= SHOW BINLOG EVENTS IN "master-bin.000003" |
|||
--let $field= Info |
|||
--let $condition= = "master-bin.000003" |
|||
--source include/wait_show_condition.inc |
|||
INSERT INTO t1 VALUES (102, REPEAT("x", 4100)); |
|||
--let $wait_for_all= 0 |
|||
--let $show_statement= SHOW BINLOG EVENTS IN "master-bin.000004" |
|||
--let $field= Info |
|||
--let $condition= = "master-bin.000004" |
|||
--source include/wait_show_condition.inc |
|||
|
|||
# Now start a bunch of transactions that span multiple binlog |
|||
# files. Leave then in the state prepared-but-not-committed in the engine |
|||
# and crash the server. Check that crash recovery is able to recover all |
|||
# of them. |
|||
# |
|||
# We use debug_sync to get all the transactions into the prepared state before |
|||
# we commit any of them. This is because the prepare step flushes the InnoDB |
|||
# redo log - including any commits made before, so recovery would become |
|||
# unnecessary, decreasing the value of this test. |
|||
# |
|||
# We arrange to have con1 with a prepared transaction in master-bin.000004, |
|||
# con2 and con3 with a prepared transaction in master-bin.000005, and a new |
|||
# empty master-bin.000006. So the latest binlog checkpoint should be |
|||
# master-bin.000006. |
|||
|
|||
connect(con1,localhost,root,,); |
|||
# First wait after prepare and before write to binlog. |
|||
SET DEBUG_SYNC= "ha_commit_trans_before_log_and_order SIGNAL con1_wait WAIT_FOR con1_cont"; |
|||
# Then complete InnoDB commit in memory (but not commit checkpoint / write to |
|||
# disk), and hang until crash, leaving a transaction to be XA recovered. |
|||
SET DEBUG_SYNC= "commit_after_group_release_commit_ordered SIGNAL con1_ready WAIT_FOR _ever"; |
|||
send INSERT INTO t1 VALUES (1, REPEAT("x", 4100)); |
|||
|
|||
connection default; |
|||
SET DEBUG_SYNC= "now WAIT_FOR con1_wait"; |
|||
|
|||
connect(con2,localhost,root,,); |
|||
SET DEBUG_SYNC= "ha_commit_trans_before_log_and_order SIGNAL con2_wait WAIT_FOR con2_cont"; |
|||
SET DEBUG_SYNC= "commit_after_group_release_commit_ordered SIGNAL con2_ready WAIT_FOR _ever"; |
|||
send INSERT INTO t1 VALUES (2, NULL); |
|||
|
|||
connection default; |
|||
SET DEBUG_SYNC= "now WAIT_FOR con2_wait"; |
|||
|
|||
connect(con3,localhost,root,,); |
|||
SET DEBUG_SYNC= "ha_commit_trans_before_log_and_order SIGNAL con3_wait WAIT_FOR con3_cont"; |
|||
SET DEBUG_SYNC= "commit_after_group_release_commit_ordered SIGNAL con3_ready WAIT_FOR _ever"; |
|||
send INSERT INTO t1 VALUES (3, REPEAT("x", 4100)); |
|||
|
|||
connection default; |
|||
SET DEBUG_SYNC= "now WAIT_FOR con3_wait"; |
|||
|
|||
connect(con4,localhost,root,,); |
|||
SET DEBUG_SYNC= "ha_commit_trans_before_log_and_order SIGNAL con4_wait WAIT_FOR con4_cont"; |
|||
SET SESSION debug_dbug="+d,crash_commit_after_log"; |
|||
send INSERT INTO t1 VALUES (4, NULL); |
|||
|
|||
connection default; |
|||
SET DEBUG_SYNC= "now WAIT_FOR con4_wait"; |
|||
|
|||
SET DEBUG_SYNC= "now SIGNAL con1_cont"; |
|||
SET DEBUG_SYNC= "now WAIT_FOR con1_ready"; |
|||
SET DEBUG_SYNC= "now SIGNAL con2_cont"; |
|||
SET DEBUG_SYNC= "now WAIT_FOR con2_ready"; |
|||
SET DEBUG_SYNC= "now SIGNAL con3_cont"; |
|||
SET DEBUG_SYNC= "now WAIT_FOR con3_ready"; |
|||
|
|||
# Check that everything is committed in binary log. |
|||
--source include/show_binary_logs.inc |
|||
--let $binlog_file= master-bin.000003 |
|||
--let $binlog_start= 4 |
|||
--source include/show_binlog_events.inc |
|||
--let $binlog_file= master-bin.000004 |
|||
--source include/show_binlog_events.inc |
|||
--let $binlog_file= master-bin.000005 |
|||
--source include/show_binlog_events.inc |
|||
--let $binlog_file= master-bin.000006 |
|||
--source include/show_binlog_events.inc |
|||
|
|||
|
|||
# Check that server will not purge too much. |
|||
PURGE BINARY LOGS TO "master-bin.000006"; |
|||
--source include/show_binary_logs.inc |
|||
|
|||
# Now crash the server with one more transaction in prepared state. |
|||
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
|||
wait-binlog_xa_recover.test |
|||
EOF |
|||
--error 0,2006,2013 |
|||
SET DEBUG_SYNC= "now SIGNAL con4_cont"; |
|||
connection con4; |
|||
--error 2006,2013 |
|||
reap; |
|||
|
|||
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
|||
restart-group_commit_binlog_pos.test |
|||
EOF |
|||
|
|||
connection default; |
|||
--enable_reconnect |
|||
--source include/wait_until_connected_again.inc |
|||
|
|||
# Check that all transactions are recovered. |
|||
SELECT a FROM t1 ORDER BY a; |
|||
|
|||
--echo Test that with multiple binlog checkpoints, recovery starts from the last one. |
|||
SET GLOBAL max_binlog_size= 4096; |
|||
SET GLOBAL innodb_flush_log_at_trx_commit= 1; |
|||
RESET MASTER; |
|||
|
|||
# Rotate to binlog master-bin.000003 while delaying binlog checkpoints. |
|||
# So we get multiple binlog checkpoints in master-bin.000003. |
|||
# Then complete the checkpoints, crash, and check that we only scan |
|||
# the necessary binlog file (ie. that we use the _last_ checkpoint). |
|||
|
|||
connect(con10,localhost,root,,); |
|||
SET DEBUG_SYNC= "commit_after_group_release_commit_ordered SIGNAL con10_ready WAIT_FOR con10_cont"; |
|||
send INSERT INTO t1 VALUES (10, REPEAT("x", 4100)); |
|||
|
|||
connection default; |
|||
SET DEBUG_SYNC= "now WAIT_FOR con10_ready"; |
|||
|
|||
connect(con11,localhost,root,,); |
|||
SET DEBUG_SYNC= "commit_after_group_release_commit_ordered SIGNAL con11_ready WAIT_FOR con11_cont"; |
|||
send INSERT INTO t1 VALUES (11, REPEAT("x", 4100)); |
|||
|
|||
connection default; |
|||
SET DEBUG_SYNC= "now WAIT_FOR con11_ready"; |
|||
|
|||
connect(con12,localhost,root,,); |
|||
SET DEBUG_SYNC= "commit_after_group_release_commit_ordered SIGNAL con12_ready WAIT_FOR con12_cont"; |
|||
send INSERT INTO t1 VALUES (12, REPEAT("x", 4100)); |
|||
|
|||
connection default; |
|||
SET DEBUG_SYNC= "now WAIT_FOR con12_ready"; |
|||
INSERT INTO t1 VALUES (13, NULL); |
|||
|
|||
--source include/show_binary_logs.inc |
|||
--let $binlog_file= master-bin.000004 |
|||
--let $binlog_start= 4 |
|||
--source include/show_binlog_events.inc |
|||
|
|||
SET DEBUG_SYNC= "now SIGNAL con10_cont"; |
|||
connection con10; |
|||
reap; |
|||
connection default; |
|||
|
|||
# We need to sync the test case with the background processing of the |
|||
# commit checkpoint, otherwise we get nondeterministic results. |
|||
SET @old_dbug= @@global.DEBUG_DBUG; |
|||
SET GLOBAL debug_dbug="+d,binlog_background_checkpoint_processed"; |
|||
SET DEBUG_SYNC= "now WAIT_FOR binlog_background_checkpoint_processed"; |
|||
SET DEBUG_SYNC= "now SIGNAL con12_cont"; |
|||
connection con12; |
|||
reap; |
|||
connection default; |
|||
SET GLOBAL debug_dbug= @old_dbug; |
|||
|
|||
SET DEBUG_SYNC= "now SIGNAL con11_cont"; |
|||
connection con11; |
|||
reap; |
|||
|
|||
connection default; |
|||
# Wait for the last (master-bin.000004) binlog checkpoint to appear. |
|||
--let $wait_for_all= 0 |
|||
--let $show_statement= SHOW BINLOG EVENTS IN "master-bin.000004" |
|||
--let $field= Info |
|||
--let $condition= = "master-bin.000004" |
|||
--source include/wait_show_condition.inc |
|||
|
|||
--echo Checking that master-bin.000004 is the last binlog checkpoint |
|||
--source include/show_binlog_events.inc |
|||
|
|||
--echo Now crash the server |
|||
# It is not too easy to test XA recovery, as it runs early during server |
|||
# startup, before any connections can be made. |
|||
# What we do is set a DBUG error insert which will crash if XA recovery |
|||
# starts from any other binlog than master-bin.000004 (check the file |
|||
# binlog_xa_recover-master.opt). Then we will fail here if XA recovery |
|||
# would start from the wrong place. |
|||
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
|||
wait-binlog_xa_recover.test |
|||
EOF |
|||
SET SESSION debug_dbug="+d,crash_commit_after_log"; |
|||
--error 2006,2013 |
|||
INSERT INTO t1 VALUES (14, NULL); |
|||
|
|||
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
|||
restart-group_commit_binlog_pos.test |
|||
EOF |
|||
|
|||
connection default; |
|||
--enable_reconnect |
|||
--source include/wait_until_connected_again.inc |
|||
|
|||
# Check that all transactions are recovered. |
|||
SELECT a FROM t1 ORDER BY a; |
|||
|
|||
|
|||
--echo *** Check that recovery works if we crashed early during rotate, before |
|||
--echo *** binlog checkpoint event could be written. |
|||
|
|||
SET GLOBAL max_binlog_size= 4096; |
|||
SET GLOBAL innodb_flush_log_at_trx_commit= 1; |
|||
RESET MASTER; |
|||
|
|||
# We need some initial data to reach binlog master-bin.000004. Otherwise |
|||
# crash recovery fails due to the error insert used for previous test. |
|||
INSERT INTO t1 VALUES (21, REPEAT("x", 4100)); |
|||
INSERT INTO t1 VALUES (22, REPEAT("x", 4100)); |
|||
# Wait for the master-bin.000003 binlog checkpoint to appear. |
|||
--let $wait_for_all= 0 |
|||
--let $show_statement= SHOW BINLOG EVENTS IN "master-bin.000003" |
|||
--let $field= Info |
|||
--let $condition= = "master-bin.000003" |
|||
--source include/wait_show_condition.inc |
|||
INSERT INTO t1 VALUES (23, REPEAT("x", 4100)); |
|||
# Wait for the last (master-bin.000004) binlog checkpoint to appear. |
|||
--let $wait_for_all= 0 |
|||
--let $show_statement= SHOW BINLOG EVENTS IN "master-bin.000004" |
|||
--let $field= Info |
|||
--let $condition= = "master-bin.000004" |
|||
--source include/wait_show_condition.inc |
|||
|
|||
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
|||
wait-binlog_xa_recover.test |
|||
EOF |
|||
SET SESSION debug_dbug="+d,crash_before_write_checkpoint_event"; |
|||
--error 2006,2013 |
|||
INSERT INTO t1 VALUES (24, REPEAT("x", 4100)); |
|||
|
|||
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
|||
restart-group_commit_binlog_pos.test |
|||
EOF |
|||
|
|||
--enable_reconnect |
|||
--source include/wait_until_connected_again.inc |
|||
|
|||
# Check that all transactions are recovered. |
|||
SELECT a FROM t1 ORDER BY a; |
|||
|
|||
--source include/show_binary_logs.inc |
|||
--let $binlog_file= master-bin.000004 |
|||
--let $binlog_start= 4 |
|||
--source include/show_binlog_events.inc |
|||
|
|||
# Cleanup |
|||
connection default; |
|||
DROP TABLE t1; |
@ -1 +1,276 @@ |
|||
--source include/binlog_xa_recover.inc |
|||
# |
|||
# This include file is used by more than one test suite |
|||
# (currently binlog and binlog_encryption). |
|||
# Please check all dependent tests after modifying it |
|||
# |
|||
|
|||
--source include/have_innodb.inc |
|||
--source include/have_debug.inc |
|||
--source include/have_debug_sync.inc |
|||
--source include/have_binlog_format_row.inc |
|||
# Valgrind does not work well with test that crashes the server |
|||
--source include/not_valgrind.inc |
|||
|
|||
# (We do not need to restore these settings, as we crash the server). |
|||
SET GLOBAL max_binlog_size= 4096; |
|||
SET GLOBAL innodb_flush_log_at_trx_commit= 1; |
|||
RESET MASTER; |
|||
|
|||
CREATE TABLE t1 (a INT PRIMARY KEY, b MEDIUMTEXT) ENGINE=Innodb; |
|||
# Insert some data to force a couple binlog rotations (3), so we get some |
|||
# normal binlog checkpoints before starting the test. |
|||
INSERT INTO t1 VALUES (100, REPEAT("x", 4100)); |
|||
# Wait for the master-bin.000002 binlog checkpoint to appear. |
|||
--let $wait_for_all= 0 |
|||
--let $show_statement= SHOW BINLOG EVENTS IN "master-bin.000002" |
|||
--let $field= Info |
|||
--let $condition= = "master-bin.000002" |
|||
--source include/wait_show_condition.inc |
|||
INSERT INTO t1 VALUES (101, REPEAT("x", 4100)); |
|||
--let $wait_for_all= 0 |
|||
--let $show_statement= SHOW BINLOG EVENTS IN "master-bin.000003" |
|||
--let $field= Info |
|||
--let $condition= = "master-bin.000003" |
|||
--source include/wait_show_condition.inc |
|||
INSERT INTO t1 VALUES (102, REPEAT("x", 4100)); |
|||
--let $wait_for_all= 0 |
|||
--let $show_statement= SHOW BINLOG EVENTS IN "master-bin.000004" |
|||
--let $field= Info |
|||
--let $condition= = "master-bin.000004" |
|||
--source include/wait_show_condition.inc |
|||
|
|||
# Now start a bunch of transactions that span multiple binlog |
|||
# files. Leave then in the state prepared-but-not-committed in the engine |
|||
# and crash the server. Check that crash recovery is able to recover all |
|||
# of them. |
|||
# |
|||
# We use debug_sync to get all the transactions into the prepared state before |
|||
# we commit any of them. This is because the prepare step flushes the InnoDB |
|||
# redo log - including any commits made before, so recovery would become |
|||
# unnecessary, decreasing the value of this test. |
|||
# |
|||
# We arrange to have con1 with a prepared transaction in master-bin.000004, |
|||
# con2 and con3 with a prepared transaction in master-bin.000005, and a new |
|||
# empty master-bin.000006. So the latest binlog checkpoint should be |
|||
# master-bin.000006. |
|||
|
|||
connect(con1,localhost,root,,); |
|||
# First wait after prepare and before write to binlog. |
|||
SET DEBUG_SYNC= "ha_commit_trans_before_log_and_order SIGNAL con1_wait WAIT_FOR con1_cont"; |
|||
# Then complete InnoDB commit in memory (but not commit checkpoint / write to |
|||
# disk), and hang until crash, leaving a transaction to be XA recovered. |
|||
SET DEBUG_SYNC= "commit_after_group_release_commit_ordered SIGNAL con1_ready WAIT_FOR _ever"; |
|||
send INSERT INTO t1 VALUES (1, REPEAT("x", 4100)); |
|||
|
|||
connection default; |
|||
SET DEBUG_SYNC= "now WAIT_FOR con1_wait"; |
|||
|
|||
connect(con2,localhost,root,,); |
|||
SET DEBUG_SYNC= "ha_commit_trans_before_log_and_order SIGNAL con2_wait WAIT_FOR con2_cont"; |
|||
SET DEBUG_SYNC= "commit_after_group_release_commit_ordered SIGNAL con2_ready WAIT_FOR _ever"; |
|||
send INSERT INTO t1 VALUES (2, NULL); |
|||
|
|||
connection default; |
|||
SET DEBUG_SYNC= "now WAIT_FOR con2_wait"; |
|||
|
|||
connect(con3,localhost,root,,); |
|||
SET DEBUG_SYNC= "ha_commit_trans_before_log_and_order SIGNAL con3_wait WAIT_FOR con3_cont"; |
|||
SET DEBUG_SYNC= "commit_after_group_release_commit_ordered SIGNAL con3_ready WAIT_FOR _ever"; |
|||
send INSERT INTO t1 VALUES (3, REPEAT("x", 4100)); |
|||
|
|||
connection default; |
|||
SET DEBUG_SYNC= "now WAIT_FOR con3_wait"; |
|||
|
|||
connect(con4,localhost,root,,); |
|||
SET DEBUG_SYNC= "ha_commit_trans_before_log_and_order SIGNAL con4_wait WAIT_FOR con4_cont"; |
|||
SET SESSION debug_dbug="+d,crash_commit_after_log"; |
|||
send INSERT INTO t1 VALUES (4, NULL); |
|||
|
|||
connection default; |
|||
SET DEBUG_SYNC= "now WAIT_FOR con4_wait"; |
|||
|
|||
SET DEBUG_SYNC= "now SIGNAL con1_cont"; |
|||
SET DEBUG_SYNC= "now WAIT_FOR con1_ready"; |
|||
SET DEBUG_SYNC= "now SIGNAL con2_cont"; |
|||
SET DEBUG_SYNC= "now WAIT_FOR con2_ready"; |
|||
SET DEBUG_SYNC= "now SIGNAL con3_cont"; |
|||
SET DEBUG_SYNC= "now WAIT_FOR con3_ready"; |
|||
|
|||
# Check that everything is committed in binary log. |
|||
--source include/show_binary_logs.inc |
|||
--let $binlog_file= master-bin.000003 |
|||
--let $binlog_start= 4 |
|||
--source include/show_binlog_events.inc |
|||
--let $binlog_file= master-bin.000004 |
|||
--source include/show_binlog_events.inc |
|||
--let $binlog_file= master-bin.000005 |
|||
--source include/show_binlog_events.inc |
|||
--let $binlog_file= master-bin.000006 |
|||
--source include/show_binlog_events.inc |
|||
|
|||
|
|||
# Check that server will not purge too much. |
|||
PURGE BINARY LOGS TO "master-bin.000006"; |
|||
--source include/show_binary_logs.inc |
|||
|
|||
# Now crash the server with one more transaction in prepared state. |
|||
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
|||
wait-binlog_xa_recover.test |
|||
EOF |
|||
--error 0,2006,2013 |
|||
SET DEBUG_SYNC= "now SIGNAL con4_cont"; |
|||
connection con4; |
|||
--error 2006,2013 |
|||
reap; |
|||
|
|||
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
|||
restart-group_commit_binlog_pos.test |
|||
EOF |
|||
|
|||
connection default; |
|||
--enable_reconnect |
|||
--source include/wait_until_connected_again.inc |
|||
|
|||
# Check that all transactions are recovered. |
|||
SELECT a FROM t1 ORDER BY a; |
|||
|
|||
--echo Test that with multiple binlog checkpoints, recovery starts from the last one. |
|||
SET GLOBAL max_binlog_size= 4096; |
|||
SET GLOBAL innodb_flush_log_at_trx_commit= 1; |
|||
RESET MASTER; |
|||
|
|||
# Rotate to binlog master-bin.000003 while delaying binlog checkpoints. |
|||
# So we get multiple binlog checkpoints in master-bin.000003. |
|||
# Then complete the checkpoints, crash, and check that we only scan |
|||
# the necessary binlog file (ie. that we use the _last_ checkpoint). |
|||
|
|||
connect(con10,localhost,root,,); |
|||
SET DEBUG_SYNC= "commit_after_group_release_commit_ordered SIGNAL con10_ready WAIT_FOR con10_cont"; |
|||
send INSERT INTO t1 VALUES (10, REPEAT("x", 4100)); |
|||
|
|||
connection default; |
|||
SET DEBUG_SYNC= "now WAIT_FOR con10_ready"; |
|||
|
|||
connect(con11,localhost,root,,); |
|||
SET DEBUG_SYNC= "commit_after_group_release_commit_ordered SIGNAL con11_ready WAIT_FOR con11_cont"; |
|||
send INSERT INTO t1 VALUES (11, REPEAT("x", 4100)); |
|||
|
|||
connection default; |
|||
SET DEBUG_SYNC= "now WAIT_FOR con11_ready"; |
|||
|
|||
connect(con12,localhost,root,,); |
|||
SET DEBUG_SYNC= "commit_after_group_release_commit_ordered SIGNAL con12_ready WAIT_FOR con12_cont"; |
|||
send INSERT INTO t1 VALUES (12, REPEAT("x", 4100)); |
|||
|
|||
connection default; |
|||
SET DEBUG_SYNC= "now WAIT_FOR con12_ready"; |
|||
INSERT INTO t1 VALUES (13, NULL); |
|||
|
|||
--source include/show_binary_logs.inc |
|||
--let $binlog_file= master-bin.000004 |
|||
--let $binlog_start= 4 |
|||
--source include/show_binlog_events.inc |
|||
|
|||
SET DEBUG_SYNC= "now SIGNAL con10_cont"; |
|||
connection con10; |
|||
reap; |
|||
connection default; |
|||
|
|||
# We need to sync the test case with the background processing of the |
|||
# commit checkpoint, otherwise we get nondeterministic results. |
|||
let $wait_condition= select count(*) = 1 from performance_schema.threads where processlist_state = "Waiting for background binlog tasks"; |
|||
--source include/wait_condition.inc |
|||
|
|||
SET DEBUG_SYNC= "now SIGNAL con12_cont"; |
|||
connection con12; |
|||
reap; |
|||
connection default; |
|||
|
|||
SET DEBUG_SYNC= "now SIGNAL con11_cont"; |
|||
connection con11; |
|||
reap; |
|||
|
|||
connection default; |
|||
# Wait for the last (master-bin.000004) binlog checkpoint to appear. |
|||
--let $wait_for_all= 0 |
|||
--let $show_statement= SHOW BINLOG EVENTS IN "master-bin.000004" |
|||
--let $field= Info |
|||
--let $condition= = "master-bin.000004" |
|||
--source include/wait_show_condition.inc |
|||
|
|||
--echo Now crash the server |
|||
# It is not too easy to test XA recovery, as it runs early during server |
|||
# startup, before any connections can be made. |
|||
# What we do is set a DBUG error insert which will crash if XA recovery |
|||
# starts from any other binlog than master-bin.000004 (check the file |
|||
# binlog_xa_recover-master.opt). Then we will fail here if XA recovery |
|||
# would start from the wrong place. |
|||
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
|||
wait-binlog_xa_recover.test |
|||
EOF |
|||
SET SESSION debug_dbug="+d,crash_commit_after_log"; |
|||
--error 2006,2013 |
|||
INSERT INTO t1 VALUES (14, NULL); |
|||
|
|||
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
|||
restart-group_commit_binlog_pos.test |
|||
EOF |
|||
|
|||
connection default; |
|||
--enable_reconnect |
|||
--source include/wait_until_connected_again.inc |
|||
|
|||
# Check that all transactions are recovered. |
|||
SELECT a FROM t1 ORDER BY a; |
|||
|
|||
|
|||
--echo *** Check that recovery works if we crashed early during rotate, before |
|||
--echo *** binlog checkpoint event could be written. |
|||
|
|||
SET GLOBAL max_binlog_size= 4096; |
|||
SET GLOBAL innodb_flush_log_at_trx_commit= 1; |
|||
RESET MASTER; |
|||
|
|||
# We need some initial data to reach binlog master-bin.000004. Otherwise |
|||
# crash recovery fails due to the error insert used for previous test. |
|||
INSERT INTO t1 VALUES (21, REPEAT("x", 4100)); |
|||
INSERT INTO t1 VALUES (22, REPEAT("x", 4100)); |
|||
# Wait for the master-bin.000003 binlog checkpoint to appear. |
|||
--let $wait_for_all= 0 |
|||
--let $show_statement= SHOW BINLOG EVENTS IN "master-bin.000003" |
|||
--let $field= Info |
|||
--let $condition= = "master-bin.000003" |
|||
--source include/wait_show_condition.inc |
|||
INSERT INTO t1 VALUES (23, REPEAT("x", 4100)); |
|||
# Wait for the last (master-bin.000004) binlog checkpoint to appear. |
|||
--let $wait_for_all= 0 |
|||
--let $show_statement= SHOW BINLOG EVENTS IN "master-bin.000004" |
|||
--let $field= Info |
|||
--let $condition= = "master-bin.000004" |
|||
--source include/wait_show_condition.inc |
|||
|
|||
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
|||
wait-binlog_xa_recover.test |
|||
EOF |
|||
SET SESSION debug_dbug="+d,crash_before_write_checkpoint_event"; |
|||
--error 2006,2013 |
|||
INSERT INTO t1 VALUES (24, REPEAT("x", 4100)); |
|||
|
|||
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
|||
restart-group_commit_binlog_pos.test |
|||
EOF |
|||
|
|||
--enable_reconnect |
|||
--source include/wait_until_connected_again.inc |
|||
|
|||
# Check that all transactions are recovered. |
|||
SELECT a FROM t1 ORDER BY a; |
|||
|
|||
--source include/show_binary_logs.inc |
|||
--let $binlog_file= master-bin.000004 |
|||
--let $binlog_start= 4 |
|||
--source include/show_binlog_events.inc |
|||
|
|||
# Cleanup |
|||
connection default; |
|||
DROP TABLE t1; |
@ -1 +0,0 @@ |
|||
--skip-stack-trace --skip-core-file --loose-debug-dbug=+d,xa_recover_expect_master_bin_000004 |
@ -1 +1 @@ |
|||
--source suite/binlog/include/binlog_xa_recover.inc |
|||
--source suite/binlog/t/binlog_xa_recover.test |
@ -0,0 +1,10 @@ |
|||
connection node_2; |
|||
connection node_1; |
|||
call mtr.add_suppression("WSREP: Unknown parameter 'a'"); |
|||
call mtr.add_suppression("WSREP: Set options returned 7"); |
|||
SET GLOBAL wsrep_provider_options=NULL; |
|||
ERROR HY000: Incorrect arguments to SET |
|||
SET GLOBAL wsrep_provider_options=''; |
|||
SET GLOBAL wsrep_provider_options=' '; |
|||
SET GLOBAL wsrep_provider_options='a=1'; |
|||
ERROR HY000: Incorrect arguments to SET |
@ -1,7 +1,7 @@ |
|||
!include ../galera_2nodes.cnf |
|||
|
|||
[mysqld.1] |
|||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;socket.ssl=yes;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/cakey.pem' |
|||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;socket.ssl=yes;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem' |
|||
|
|||
[mysqld.2] |
|||
wsrep_provider_options='base_port=@mysqld.2.#galera_port;socket.ssl=yes;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/cakey.pem' |
|||
wsrep_provider_options='base_port=@mysqld.2.#galera_port;socket.ssl=yes;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem' |
@ -0,0 +1,11 @@ |
|||
--source include/galera_cluster.inc |
|||
|
|||
call mtr.add_suppression("WSREP: Unknown parameter 'a'"); |
|||
call mtr.add_suppression("WSREP: Set options returned 7"); |
|||
|
|||
--error ER_WRONG_ARGUMENTS |
|||
SET GLOBAL wsrep_provider_options=NULL; |
|||
SET GLOBAL wsrep_provider_options=''; |
|||
SET GLOBAL wsrep_provider_options=' '; |
|||
--error ER_WRONG_ARGUMENTS |
|||
SET GLOBAL wsrep_provider_options='a=1'; |
@ -1 +0,0 @@ |
|||
--innodb_fast_shutdown=0 |
@ -1,49 +0,0 @@ |
|||
# Bug #60049 Verify that purge leaves no garbage in unique secondary indexes |
|||
# This test requires a fresh server start-up and a slow shutdown. |
|||
# This was a suspected bug (not a bug). |
|||
|
|||
-- source include/not_embedded.inc |
|||
-- source include/have_innodb.inc |
|||
-- source include/have_innodb_16k.inc |
|||
|
|||
-- disable_query_log |
|||
call mtr.add_suppression('\\[ERROR\\] InnoDB: Table `mysql`.`innodb_(table|index)_stats` not found'); |
|||
call mtr.add_suppression('\\[ERROR\\] InnoDB: Fetch of persistent statistics requested for table `mysql`.`gtid_executed`'); |
|||
|
|||
let $create1 = query_get_value(SHOW CREATE TABLE mysql.innodb_table_stats, Create Table, 1); |
|||
let $create2 = query_get_value(SHOW CREATE TABLE mysql.innodb_index_stats, Create Table, 1); |
|||
DROP TABLE mysql.innodb_index_stats; |
|||
DROP TABLE mysql.innodb_table_stats; |
|||
-- enable_query_log |
|||
|
|||
CREATE TABLE t(a INT)ENGINE=InnoDB STATS_PERSISTENT=0; |
|||
RENAME TABLE t TO u; |
|||
DROP TABLE u; |
|||
SELECT @@innodb_fast_shutdown; |
|||
let $MYSQLD_DATADIR=`select @@datadir`; |
|||
|
|||
--source include/shutdown_mysqld.inc |
|||
|
|||
# Check the tail of ID_IND (SYS_TABLES.ID) |
|||
let IBDATA1=$MYSQLD_DATADIR/ibdata1; |
|||
perl; |
|||
my $file = $ENV{'IBDATA1'}; |
|||
open(FILE, "<$file") || die "Unable to open $file"; |
|||
# Read DICT_HDR_TABLE_IDS, the root page number of ID_IND (SYS_TABLES.ID). |
|||
seek(FILE, 7*16384+38+36, 0) || die "Unable to seek $file"; |
|||
die unless read(FILE, $_, 4) == 4; |
|||
my $sys_tables_id_root = unpack("N", $_); |
|||
print "Last record of ID_IND root page ($sys_tables_id_root):\n"; |
|||
# This should be the last record in ID_IND. Dump it in hexadecimal. |
|||
seek(FILE, $sys_tables_id_root*16384 + 152, 0) || die "Unable to seek $file"; |
|||
read(FILE, $_, 32) || die "Unable to read $file"; |
|||
close(FILE); |
|||
print unpack("H*", $_), "\n"; |
|||
EOF |
|||
|
|||
--source include/start_mysqld.inc |
|||
|
|||
-- disable_query_log |
|||
USE mysql; |
|||
eval $create1; |
|||
eval $create2; |
Write
Preview
Loading…
Cancel
Save
Reference in new issue