Commit 4d48802f authored by Guilhem Bichot's avatar Guilhem Bichot

Fix for BUG#35107 "maria-preload.test is disabled because unrepeatable page cache statistics"

What varies accross machine is maria_pagecache_read_requests, but maria_pagecache_reads doesn't and
is the most interesting (helps verify that disk wasn't touched after preloading), that's all we keep.

mysql-test/r/maria-preload.result:
  unrepeatable variable removed
mysql-test/t/maria-preload.test:
  unrepeatable variable removed
storage/maria/ma_test_force_start.pl:
  portability fix for running under Windows
parent 47f01c42
...@@ -2,7 +2,7 @@ drop table if exists t1, t2; ...@@ -2,7 +2,7 @@ drop table if exists t1, t2;
set global maria_checkpoint_interval=0; set global maria_checkpoint_interval=0;
create temporary table initial create temporary table initial
select variable_name,variable_value from select variable_name,variable_value from
information_schema.global_status where variable_name like "Maria_pagecache_read%"; information_schema.global_status where variable_name like "Maria_pagecache_reads";
create table t1 ( create table t1 (
a int not null auto_increment, a int not null auto_increment,
b char(16) not null, b char(16) not null,
...@@ -52,21 +52,18 @@ flush tables; ...@@ -52,21 +52,18 @@ flush tables;
flush status; flush status;
select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
variable_name g.variable_value-i.variable_value variable_name g.variable_value-i.variable_value
MARIA_PAGECACHE_READ_REQUESTS 211645
MARIA_PAGECACHE_READS 3 MARIA_PAGECACHE_READS 3
select count(*) from t1 where b = 'test1'; select count(*) from t1 where b = 'test1';
count(*) count(*)
4181 4181
select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
variable_name g.variable_value-i.variable_value variable_name g.variable_value-i.variable_value
MARIA_PAGECACHE_READ_REQUESTS 211928
MARIA_PAGECACHE_READS 11 MARIA_PAGECACHE_READS 11
select count(*) from t1 where b = 'test1'; select count(*) from t1 where b = 'test1';
count(*) count(*)
4181 4181
select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
variable_name g.variable_value-i.variable_value variable_name g.variable_value-i.variable_value
MARIA_PAGECACHE_READ_REQUESTS 212211
MARIA_PAGECACHE_READS 12 MARIA_PAGECACHE_READS 12
flush tables; flush tables;
flush status; flush status;
...@@ -78,20 +75,17 @@ Table Op Msg_type Msg_text ...@@ -78,20 +75,17 @@ Table Op Msg_type Msg_text
test.t1 preload_keys status OK test.t1 preload_keys status OK
select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
variable_name g.variable_value-i.variable_value variable_name g.variable_value-i.variable_value
MARIA_PAGECACHE_READ_REQUESTS 212539
MARIA_PAGECACHE_READS 84 MARIA_PAGECACHE_READS 84
select count(*) from t1 where b = 'test1'; select count(*) from t1 where b = 'test1';
count(*) count(*)
4181 4181
select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
variable_name g.variable_value-i.variable_value variable_name g.variable_value-i.variable_value
MARIA_PAGECACHE_READ_REQUESTS 212822
MARIA_PAGECACHE_READS 85 MARIA_PAGECACHE_READS 85
flush tables; flush tables;
flush status; flush status;
select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
variable_name g.variable_value-i.variable_value variable_name g.variable_value-i.variable_value
MARIA_PAGECACHE_READ_REQUESTS 213079
MARIA_PAGECACHE_READS 86 MARIA_PAGECACHE_READS 86
set session preload_buffer_size=256*1024; set session preload_buffer_size=256*1024;
select @@preload_buffer_size; select @@preload_buffer_size;
...@@ -102,20 +96,17 @@ Table Op Msg_type Msg_text ...@@ -102,20 +96,17 @@ Table Op Msg_type Msg_text
test.t1 preload_keys status OK test.t1 preload_keys status OK
select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
variable_name g.variable_value-i.variable_value variable_name g.variable_value-i.variable_value
MARIA_PAGECACHE_READ_REQUESTS 213407
MARIA_PAGECACHE_READS 158 MARIA_PAGECACHE_READS 158
select count(*) from t1 where b = 'test1'; select count(*) from t1 where b = 'test1';
count(*) count(*)
4181 4181
select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
variable_name g.variable_value-i.variable_value variable_name g.variable_value-i.variable_value
MARIA_PAGECACHE_READ_REQUESTS 213690
MARIA_PAGECACHE_READS 165 MARIA_PAGECACHE_READS 165
flush tables; flush tables;
flush status; flush status;
select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
variable_name g.variable_value-i.variable_value variable_name g.variable_value-i.variable_value
MARIA_PAGECACHE_READ_REQUESTS 213947
MARIA_PAGECACHE_READS 166 MARIA_PAGECACHE_READS 166
set session preload_buffer_size=1*1024; set session preload_buffer_size=1*1024;
select @@preload_buffer_size; select @@preload_buffer_size;
...@@ -127,7 +118,6 @@ test.t1 preload_keys status OK ...@@ -127,7 +118,6 @@ test.t1 preload_keys status OK
test.t2 preload_keys status OK test.t2 preload_keys status OK
select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
variable_name g.variable_value-i.variable_value variable_name g.variable_value-i.variable_value
MARIA_PAGECACHE_READ_REQUESTS 214318
MARIA_PAGECACHE_READS 281 MARIA_PAGECACHE_READS 281
select count(*) from t1 where b = 'test1'; select count(*) from t1 where b = 'test1';
count(*) count(*)
...@@ -137,13 +127,11 @@ count(*) ...@@ -137,13 +127,11 @@ count(*)
2584 2584
select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
variable_name g.variable_value-i.variable_value variable_name g.variable_value-i.variable_value
MARIA_PAGECACHE_READ_REQUESTS 214615
MARIA_PAGECACHE_READS 285 MARIA_PAGECACHE_READS 285
flush tables; flush tables;
flush status; flush status;
select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
variable_name g.variable_value-i.variable_value variable_name g.variable_value-i.variable_value
MARIA_PAGECACHE_READ_REQUESTS 214872
MARIA_PAGECACHE_READS 286 MARIA_PAGECACHE_READS 286
load index into cache t3, t2 key (primary,b) ; load index into cache t3, t2 key (primary,b) ;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
...@@ -152,13 +140,11 @@ test.t3 preload_keys error Corrupt ...@@ -152,13 +140,11 @@ test.t3 preload_keys error Corrupt
test.t2 preload_keys status OK test.t2 preload_keys status OK
select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
variable_name g.variable_value-i.variable_value variable_name g.variable_value-i.variable_value
MARIA_PAGECACHE_READ_REQUESTS 215172
MARIA_PAGECACHE_READS 330 MARIA_PAGECACHE_READS 330
flush tables; flush tables;
flush status; flush status;
select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
variable_name g.variable_value-i.variable_value variable_name g.variable_value-i.variable_value
MARIA_PAGECACHE_READ_REQUESTS 215429
MARIA_PAGECACHE_READS 331 MARIA_PAGECACHE_READS 331
load index into cache t3 key (b), t2 key (c) ; load index into cache t3 key (b), t2 key (c) ;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
...@@ -168,7 +154,6 @@ test.t2 preload_keys Error Key 'c' doesn't exist in table 't2' ...@@ -168,7 +154,6 @@ test.t2 preload_keys Error Key 'c' doesn't exist in table 't2'
test.t2 preload_keys status Operation failed test.t2 preload_keys status Operation failed
select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc; select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
variable_name g.variable_value-i.variable_value variable_name g.variable_value-i.variable_value
MARIA_PAGECACHE_READ_REQUESTS 215686
MARIA_PAGECACHE_READS 332 MARIA_PAGECACHE_READS 332
drop table t1, t2; drop table t1, t2;
drop temporary table initial; drop temporary table initial;
......
...@@ -13,10 +13,11 @@ let $def_checkinterval=`select @@global.maria_checkpoint_interval`; ...@@ -13,10 +13,11 @@ let $def_checkinterval=`select @@global.maria_checkpoint_interval`;
set global maria_checkpoint_interval=0; set global maria_checkpoint_interval=0;
# Work around BUG#34911 "FLUSH STATUS doesn't flush what it should": # Work around BUG#34911 "FLUSH STATUS doesn't flush what it should":
# compute differences in status variables before and after relevant queries # compute differences in status variables before and after relevant
# queries. Maria_pagecache_read_requests varies accross machines.
create temporary table initial create temporary table initial
select variable_name,variable_value from select variable_name,variable_value from
information_schema.global_status where variable_name like "Maria_pagecache_read%"; information_schema.global_status where variable_name like "Maria_pagecache_reads";
# we don't use block-format because we want page cache stats # we don't use block-format because we want page cache stats
# about indices and not data pages. # about indices and not data pages.
......
...@@ -160,7 +160,7 @@ open(FILE, "<", $error_log_name) or die; ...@@ -160,7 +160,7 @@ open(FILE, "<", $error_log_name) or die;
@cmd_output= <FILE>; @cmd_output= <FILE>;
close FILE; close FILE;
die unless grep(/\[Warning\] mysqld(.exe)*: Maria engine: removed all logs after [\d]+ consecutive failures of recovery from logs/, @cmd_output); die unless grep(/\[Warning\] mysqld(.exe)*: Maria engine: removed all logs after [\d]+ consecutive failures of recovery from logs/, @cmd_output);
die unless grep(/\[ERROR\] mysqld(.exe)*: File '...tmp.maria_log.00000001' not found \(Errcode: 2\)/, @cmd_output); die unless grep(/\[ERROR\] mysqld(.exe)*: File '.*tmp.maria_log.00000001' not found \(Errcode: 2\)/, @cmd_output);
print "success - ok\n"; print "success - ok\n";
open(FILE, ">", $sql_name) or die; open(FILE, ">", $sql_name) or die;
......
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