Commit e40d232a authored by Sergei Petrunia's avatar Sergei Petrunia

Stabilize analyze_engine_stats2.test

parent 513c8270
--innodb_buffer_pool_dump_at_shutdown=off --innodb_buffer_pool_load_at_startup=off --innodb-stats-persistent=1 --innodb-stats-auto-recalc=off
--innodb-buffer-pool-size=32M --innodb_buffer_pool_dump_at_shutdown=off --innodb_buffer_pool_load_at_startup=off --innodb-stats-persistent=1 --innodb-stats-auto-recalc=off
......@@ -8,45 +8,20 @@ c varchar(255),
d varchar(255),
primary key(a,b,c,d)
) engine=innodb;
SET unique_checks=0, foreign_key_checks= 0;
begin;
insert into t1 select
repeat(uuid(), 7),
repeat(uuid(), 7),
repeat(uuid(), 7),
repeat(uuid(), 7)
from seq_1_to_16384;
commit;
SET GLOBAL innodb_fast_shutdown=0;
# restart
set log_slow_verbosity='engine';
set long_query_time=0.0;
set @js='$analyze_output';
select @js;
@js
{
"query_block": {
"select_id": 1,
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"table": {
"table_name": "t1",
"access_type": "index",
"key": "PRIMARY",
"key_length": "1028",
"used_key_parts": ["a", "b", "c", "d"],
"r_loops": 1,
"rows": 1,
"r_rows": 16384,
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"r_engine_stats": {
"pages_accessed": "REPLACED",
"pages_read_count": "REPLACED",
"pages_read_time_ms": "REPLACED"
},
"filtered": 100,
"r_filtered": 100,
"using_index": true
}
}
}
set @pages_read_time_ms=
(select json_value(@js,'$.query_block.table.r_engine_stats.pages_read_time_ms'));
......
......@@ -18,6 +18,9 @@ create table t1 (
primary key(a,b,c,d)
) engine=innodb;
SET unique_checks=0, foreign_key_checks= 0;
begin;
# The data size is 160K * 1K = 160M
# 16M / (page_size=16K) = 1K pages.
insert into t1 select
......@@ -26,7 +29,9 @@ insert into t1 select
repeat(uuid(), 7),
repeat(uuid(), 7)
from seq_1_to_16384;
commit;
SET GLOBAL innodb_fast_shutdown=0;
source include/restart_mysqld.inc;
set log_slow_verbosity='engine';
set long_query_time=0.0;
......@@ -35,10 +40,6 @@ let $analyze_output= `analyze format=json
select * from t1 force index (PRIMARY) order by a desc, b desc, c desc, d desc`;
evalp set @js='$analyze_output';
# Print it out for user-friendlines
--replace_regex /("(r_[a-z_]*_time_ms|pages[^"]*)": )[^, \n]*/\1"REPLACED"/
select @js;
set @pages_read_time_ms=
(select json_value(@js,'$.query_block.table.r_engine_stats.pages_read_time_ms'));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment