1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

P_S 5.7.28

This commit is contained in:
Sergei Golubchik
2019-12-10 15:35:00 +01:00
parent dfe6e914e5
commit 0ea717f51a
942 changed files with 174739 additions and 20780 deletions

View File

@ -2,6 +2,19 @@
#
# See comments in include/table_aggregate_setup.inc
#
# Notes about the optimizer and query plans:
# The following statement
# SELECT * from t1 where b=5;
# can be executed either:
# - by using the index "index_b" on column b
# - by using a full table scan and the where clause.
# Which plan is used can be unpredictable.
# To ensure that the index is really used,
# so that table io against the index is measured,
# the payload in this test uses:
# SELECT * from t1 force index(index_b) where b=5;
#
# Display the current setup used
@ -88,13 +101,34 @@ update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
# select with index
select * from test.t1 where b=5;
select * from test.t2 where b=5;
select * from test.t3 where b=5;
select * from test.t1 force index(index_b) where b=5;
select * from test.t2 force index(index_b) where b=5;
select * from test.t3 force index(index_b) where b=5;
--connection default
echo "================== Step 3 ==================";
echo "================== Step 3-A ==================";
call dump_thread();
execute dump_waits_account;
execute dump_waits_user;
execute dump_waits_host;
execute dump_waits_global;
execute dump_waits_history;
execute dump_waits_index_io;
execute dump_waits_table_io;
execute dump_waits_table_lock;
execute dump_objects_summary;
--connection con1
# This cause aggregation, so that index names are finally recorded
flush tables;
echo "================== con1 FLUSH ==================";
--connection default
echo "================== Step 3-B ==================";
call dump_thread();
execute dump_waits_account;
execute dump_waits_user;
@ -147,9 +181,9 @@ update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
# select with index
select * from test.t1 where b=5;
select * from test.t2 where b=5;
select * from test.t3 where b=5;
select * from test.t1 force index(index_b) where b=5;
select * from test.t2 force index(index_b) where b=5;
select * from test.t3 force index(index_b) where b=5;
--connection default
@ -202,9 +236,9 @@ update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
# select with index
select * from test.t1 where b=5;
select * from test.t2 where b=5;
select * from test.t3 where b=5;
select * from test.t1 force index(index_b) where b=5;
select * from test.t2 force index(index_b) where b=5;
select * from test.t3 force index(index_b) where b=5;
--connection default
@ -257,9 +291,9 @@ update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
# select with index
select * from test.t1 where b=5;
select * from test.t2 where b=5;
select * from test.t3 where b=5;
select * from test.t1 force index(index_b) where b=5;
select * from test.t2 force index(index_b) where b=5;
select * from test.t3 force index(index_b) where b=5;
--connection default
@ -494,4 +528,5 @@ execute dump_waits_table_lock;
execute dump_objects_summary;
# On test failures, may help to track the root cause
show status like "performance_schema%";
show global status like "performance_schema%";