38 changed files with 858 additions and 643 deletions
-
32extra/mariabackup/xtrabackup.cc
-
2mysql-test/include/maria_empty_logs.inc
-
30mysql-test/include/wait_until_no_pidfile.inc
-
2mysql-test/main/log_slow.test
-
17mysql-test/main/order_by_optimizer_innodb.result
-
16mysql-test/main/order_by_optimizer_innodb.test
-
21mysql-test/suite/innodb/r/undo_space_dblwr.result
-
2mysql-test/suite/innodb/t/undo_space_dblwr.opt
-
47mysql-test/suite/innodb/t/undo_space_dblwr.test
-
6mysql-test/suite/mariabackup/data_directory.result
-
15mysql-test/suite/mariabackup/data_directory.test
-
13mysql-test/suite/perfschema/include/wait_for_pfs_thread_count.inc
-
41mysql-test/suite/perfschema/r/events_waits_current_MDEV-29091.result
-
124mysql-test/suite/perfschema/r/show_aggregate.result
-
120mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result
-
180mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result
-
120mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result
-
180mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result
-
62mysql-test/suite/perfschema/t/events_waits_current_MDEV-29091.test
-
67mysql-test/suite/perfschema/t/show_aggregate.test
-
2plugin/type_test/mysql-test/type_test/type_test_double.result
-
62sql/field.cc
-
43sql/field.h
-
2storage/innobase/buf/buf0dblwr.cc
-
5storage/innobase/fil/fil0fil.cc
-
57storage/innobase/fsp/fsp0file.cc
-
4storage/innobase/fsp/fsp0sysspace.cc
-
25storage/innobase/handler/ha_innodb.cc
-
5storage/innobase/include/fsp0file.h
-
8storage/innobase/include/log0log.h
-
12storage/innobase/include/log0recv.h
-
5storage/innobase/include/row0mysql.h
-
15storage/innobase/log/log0log.cc
-
69storage/innobase/log/log0recv.cc
-
42storage/innobase/srv/srv0start.cc
-
5storage/innobase/trx/trx0undo.cc
-
40storage/maria/ma_loghandler.c
-
3storage/perfschema/pfs.cc
@ -0,0 +1,30 @@ |
|||
# Include this script after a shutdown to wait until the pid file, |
|||
# stored in $pid_file, has disappered. |
|||
|
|||
#--echo $pid_file |
|||
|
|||
--disable_result_log |
|||
--disable_query_log |
|||
# Wait one minute |
|||
let $counter= 600; |
|||
while ($counter) |
|||
{ |
|||
--error 0,1 |
|||
--file_exists $pid_file |
|||
if (!$errno) |
|||
{ |
|||
dec $counter; |
|||
--real_sleep 0.1 |
|||
} |
|||
if ($errno) |
|||
{ |
|||
let $counter= 0; |
|||
} |
|||
} |
|||
if (!$errno) |
|||
{ |
|||
--die Pid file "$pid_file" failed to disappear |
|||
} |
|||
|
|||
--enable_query_log |
|||
--enable_result_log |
@ -0,0 +1,21 @@ |
|||
call mtr.add_suppression("Checksum mismatch in the first page of file"); |
|||
show variables like 'innodb_doublewrite'; |
|||
Variable_name Value |
|||
innodb_doublewrite ON |
|||
create table t1(f1 int not null, f2 int not null)engine=innodb; |
|||
insert into t1 values (1, 1); |
|||
SET GLOBAL innodb_purge_rseg_truncate_frequency=1; |
|||
InnoDB 0 transactions not purged |
|||
set GLOBAL innodb_log_checkpoint_now=1; |
|||
# Make the first page dirty for undo tablespace |
|||
set global innodb_saved_page_number_debug = 0; |
|||
set global innodb_fil_make_page_dirty_debug = 1; |
|||
SET GLOBAL innodb_max_dirty_pages_pct_lwm=0.0; |
|||
SET GLOBAL innodb_max_dirty_pages_pct=0.0; |
|||
# Kill the server |
|||
# restart |
|||
FOUND 1 /Checksum mismatch in the first page of file/ in mysqld.1.err |
|||
check table t1; |
|||
Table Op Msg_type Msg_text |
|||
test.t1 check status OK |
|||
drop table t1; |
@ -0,0 +1,2 @@ |
|||
--innodb_undo_tablespaces=3 |
|||
--innodb_sys_tablespaces |
@ -0,0 +1,47 @@ |
|||
--source include/have_innodb.inc |
|||
--source include/have_debug.inc |
|||
--source include/not_embedded.inc |
|||
call mtr.add_suppression("Checksum mismatch in the first page of file"); |
|||
let INNODB_PAGE_SIZE=`select @@innodb_page_size`; |
|||
let MYSQLD_DATADIR=`select @@datadir`; |
|||
|
|||
show variables like 'innodb_doublewrite'; |
|||
create table t1(f1 int not null, f2 int not null)engine=innodb; |
|||
insert into t1 values (1, 1); |
|||
|
|||
SET GLOBAL innodb_purge_rseg_truncate_frequency=1; |
|||
--source include/wait_all_purged.inc |
|||
|
|||
set GLOBAL innodb_log_checkpoint_now=1; |
|||
--source ../include/no_checkpoint_start.inc |
|||
|
|||
--echo # Make the first page dirty for undo tablespace |
|||
set global innodb_saved_page_number_debug = 0; |
|||
set global innodb_fil_make_page_dirty_debug = 1; |
|||
|
|||
SET GLOBAL innodb_max_dirty_pages_pct_lwm=0.0; |
|||
SET GLOBAL innodb_max_dirty_pages_pct=0.0; |
|||
|
|||
sleep 1; |
|||
--let CLEANUP_IF_CHECKPOINT=drop table t1; |
|||
--source ../include/no_checkpoint_end.inc |
|||
|
|||
perl; |
|||
use IO::Handle; |
|||
my $fname= "$ENV{'MYSQLD_DATADIR'}/undo001"; |
|||
my $page_size = $ENV{INNODB_PAGE_SIZE}; |
|||
die unless open(FILE, "+<", $fname); |
|||
sysread(FILE, $page, $page_size)==$page_size||die "Unable to read $name\n"; |
|||
substr($page, 49, 4) = pack("N", 1000); |
|||
sysseek(FILE, 0, 0)||die "Unable to seek $fname\n"; |
|||
die unless syswrite(FILE, $page, $page_size) == $page_size; |
|||
close FILE; |
|||
EOF |
|||
|
|||
--source include/start_mysqld.inc |
|||
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; |
|||
let SEARCH_PATTERN= Checksum mismatch in the first page of file; |
|||
--source include/search_pattern_in_file.inc |
|||
|
|||
check table t1; |
|||
drop table t1; |
@ -1,41 +0,0 @@ |
|||
SET default_storage_engine=InnoDB; |
|||
SELECT @save_instrument_enabled := ENABLED |
|||
, @save_instrument_timed := TIMED |
|||
FROM performance_schema.setup_instruments |
|||
WHERE NAME = 'wait/lock/table/sql/handler'; |
|||
@save_instrument_enabled := ENABLED @save_instrument_timed := TIMED |
|||
YES YES |
|||
SELECT @save_consumer_enabled := ENABLED |
|||
FROM performance_schema.setup_consumers |
|||
WHERE NAME = 'events_waits_current'; |
|||
@save_consumer_enabled := ENABLED |
|||
YES |
|||
UPDATE performance_schema.setup_instruments |
|||
SET ENABLED = 'YES', TIMED = 'YES' |
|||
WHERE NAME = 'wait/lock/table/sql/handler'; |
|||
UPDATE performance_schema.setup_consumers |
|||
SET ENABLED = 'YES' |
|||
WHERE NAME = 'events_waits_current'; |
|||
CREATE TABLE t1 (id1 INT(11), col1 VARCHAR (200)); |
|||
INSERT INTO t1 VALUES (1, 'aa'); |
|||
INSERT INTO t1 VALUES (2, 'bb'); |
|||
connect con1,localhost,root,,test; |
|||
connect con2,localhost,root,,test; |
|||
connection con1; |
|||
START TRANSACTION; |
|||
connection con2; |
|||
START TRANSACTION; |
|||
SELECT id1 FROM t1 WHERE id1=1 FOR UPDATE; |
|||
connection default; |
|||
SELECT event_name FROM performance_schema.events_waits_current |
|||
WHERE event_name LIKE '%wait/lock/table/sql/handler%'; |
|||
event_name |
|||
UPDATE performance_schema.setup_instruments |
|||
SET ENABLED = @save_instrument_enabled, TIMED = @save_instrument_timed |
|||
WHERE NAME = 'wait/lock/table/sql/handler'; |
|||
UPDATE performance_schema.setup_consumers |
|||
SET ENABLED = @save_consumer_enabled |
|||
WHERE NAME = 'events_waits_current'; |
|||
disconnect con1; |
|||
disconnect con2; |
|||
DROP TABLE t1; |
@ -1,62 +0,0 @@ |
|||
# |
|||
# proper event name wait/lock/table/sql/handler recorded in |
|||
# PERFORMANCE_SCHEMA.EVENTS_WAITS_CURRENT. Before this fix, it was |
|||
# labeled as wait/io/table/sql/handler. |
|||
# |
|||
|
|||
--source include/have_innodb.inc |
|||
--source include/have_perfschema.inc |
|||
--source include/not_embedded.inc |
|||
|
|||
SET default_storage_engine=InnoDB; |
|||
|
|||
SELECT @save_instrument_enabled := ENABLED |
|||
, @save_instrument_timed := TIMED |
|||
FROM performance_schema.setup_instruments |
|||
WHERE NAME = 'wait/lock/table/sql/handler'; |
|||
|
|||
SELECT @save_consumer_enabled := ENABLED |
|||
FROM performance_schema.setup_consumers |
|||
WHERE NAME = 'events_waits_current'; |
|||
|
|||
UPDATE performance_schema.setup_instruments |
|||
SET ENABLED = 'YES', TIMED = 'YES' |
|||
WHERE NAME = 'wait/lock/table/sql/handler'; |
|||
|
|||
UPDATE performance_schema.setup_consumers |
|||
SET ENABLED = 'YES' |
|||
WHERE NAME = 'events_waits_current'; |
|||
|
|||
CREATE TABLE t1 (id1 INT(11), col1 VARCHAR (200)); |
|||
INSERT INTO t1 VALUES (1, 'aa'); |
|||
INSERT INTO t1 VALUES (2, 'bb'); |
|||
|
|||
connect (con1,localhost,root,,test); |
|||
connect (con2,localhost,root,,test); |
|||
|
|||
connection con1; |
|||
START TRANSACTION; |
|||
let $wait_condition= |
|||
SELECT id1 FROM t1 WHERE id1=1 FOR UPDATE; |
|||
--source include/wait_condition.inc |
|||
|
|||
connection con2; |
|||
START TRANSACTION; |
|||
send SELECT id1 FROM t1 WHERE id1=1 FOR UPDATE; |
|||
|
|||
connection default; |
|||
SELECT event_name FROM performance_schema.events_waits_current |
|||
WHERE event_name LIKE '%wait/lock/table/sql/handler%'; |
|||
|
|||
# clean up |
|||
UPDATE performance_schema.setup_instruments |
|||
SET ENABLED = @save_instrument_enabled, TIMED = @save_instrument_timed |
|||
WHERE NAME = 'wait/lock/table/sql/handler'; |
|||
|
|||
UPDATE performance_schema.setup_consumers |
|||
SET ENABLED = @save_consumer_enabled |
|||
WHERE NAME = 'events_waits_current'; |
|||
|
|||
disconnect con1; |
|||
disconnect con2; |
|||
DROP TABLE t1; |
Write
Preview
Loading…
Cancel
Save
Reference in new issue