Skip to content

Commit 1f4ebbd

Browse files
author
Sergei Golubchik
committed
MDEV-7184 main.key_cache fails in buildbot on Windows 32bit
change the test not to use absolute values of Key_blocks_unused.
1 parent 56c323c commit 1f4ebbd

File tree

2 files changed

+40
-36
lines changed

2 files changed

+40
-36
lines changed

mysql-test/r/key_cache.result

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -435,16 +435,16 @@ p i a
435435
4 3 zzzz
436436
update t1 set p=3 where p=1;
437437
update t2 set i=2 where i=1;
438-
show status like 'key_%';
439-
Variable_name Value
440-
Key_blocks_not_flushed 0
441-
Key_blocks_unused KEY_BLOCKS_UNUSED
442-
Key_blocks_used 4
443-
Key_blocks_warm 0
444-
Key_read_requests 22
445-
Key_reads 0
446-
Key_write_requests 26
447-
Key_writes 6
438+
select * from information_schema.session_status where variable_name like 'key_%' and variable_name != 'Key_blocks_unused';
439+
VARIABLE_NAME VARIABLE_VALUE
440+
KEY_BLOCKS_NOT_FLUSHED 0
441+
KEY_BLOCKS_USED 4
442+
KEY_BLOCKS_WARM 0
443+
KEY_READ_REQUESTS 22
444+
KEY_READS 0
445+
KEY_WRITE_REQUESTS 26
446+
KEY_WRITES 6
447+
select variable_value into @key_blocks_unused from information_schema.session_status where variable_name = 'Key_blocks_unused';
448448
select * from information_schema.key_caches where segment_number is null;
449449
KEY_CACHE_NAME SEGMENTS SEGMENT_NUMBER FULL_SIZE BLOCK_SIZE USED_BLOCKS UNUSED_BLOCKS DIRTY_BLOCKS READ_REQUESTS READS WRITE_REQUESTS WRITES
450450
default NULL NULL 2097152 1024 4 # 0 22 0 26 6
@@ -483,16 +483,18 @@ p i a
483483
4 3 zzzz
484484
update t1 set p=3 where p=1;
485485
update t2 set i=2 where i=1;
486-
show status like 'key_%';
487-
Variable_name Value
488-
Key_blocks_not_flushed 0
489-
Key_blocks_unused KEY_BLOCKS_UNUSED
490-
Key_blocks_used 4
491-
Key_blocks_warm 0
492-
Key_read_requests 22
493-
Key_reads 0
494-
Key_write_requests 26
495-
Key_writes 6
486+
select * from information_schema.session_status where variable_name like 'key_%' and variable_name != 'Key_blocks_unused';
487+
VARIABLE_NAME VARIABLE_VALUE
488+
KEY_BLOCKS_NOT_FLUSHED 0
489+
KEY_BLOCKS_USED 4
490+
KEY_BLOCKS_WARM 0
491+
KEY_READ_REQUESTS 22
492+
KEY_READS 0
493+
KEY_WRITE_REQUESTS 26
494+
KEY_WRITES 6
495+
select variable_value < @key_blocks_unused from information_schema.session_status where variable_name = 'Key_blocks_unused';
496+
variable_value < @key_blocks_unused
497+
1
496498
select * from information_schema.key_caches where segment_number is null;
497499
KEY_CACHE_NAME SEGMENTS SEGMENT_NUMBER FULL_SIZE BLOCK_SIZE USED_BLOCKS UNUSED_BLOCKS DIRTY_BLOCKS READ_REQUESTS READS WRITE_REQUESTS WRITES
498500
default 2 NULL 2097152 1024 4 # 0 22 0 26 6
@@ -526,16 +528,18 @@ p i a
526528
4 3 zzzz
527529
update t1 set p=3 where p=1;
528530
update t2 set i=2 where i=1;
529-
show status like 'key_%';
530-
Variable_name Value
531-
Key_blocks_not_flushed 0
532-
Key_blocks_unused KEY_BLOCKS_UNUSED
533-
Key_blocks_used 4
534-
Key_blocks_warm 0
535-
Key_read_requests 22
536-
Key_reads 0
537-
Key_write_requests 26
538-
Key_writes 6
531+
select * from information_schema.session_status where variable_name like 'key_%' and variable_name != 'Key_blocks_unused';
532+
VARIABLE_NAME VARIABLE_VALUE
533+
KEY_BLOCKS_NOT_FLUSHED 0
534+
KEY_BLOCKS_USED 4
535+
KEY_BLOCKS_WARM 0
536+
KEY_READ_REQUESTS 22
537+
KEY_READS 0
538+
KEY_WRITE_REQUESTS 26
539+
KEY_WRITES 6
540+
select variable_value = @key_blocks_unused from information_schema.session_status where variable_name = 'Key_blocks_unused';
541+
variable_value = @key_blocks_unused
542+
1
539543
select * from information_schema.key_caches where segment_number is null;
540544
KEY_CACHE_NAME SEGMENTS SEGMENT_NUMBER FULL_SIZE BLOCK_SIZE USED_BLOCKS UNUSED_BLOCKS DIRTY_BLOCKS READ_REQUESTS READS WRITE_REQUESTS WRITES
541545
default 1 NULL 2097152 1024 4 # 0 22 0 26 6

mysql-test/t/key_cache.test

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@ select * from t2;
301301
update t1 set p=3 where p=1;
302302
update t2 set i=2 where i=1;
303303

304-
--replace_result 1804 KEY_BLOCKS_UNUSED 1801 KEY_BLOCKS_UNUSED 1663 KEY_BLOCKS_UNUSED 1782 KEY_BLOCKS_UNUSED
305-
show status like 'key_%';
304+
select * from information_schema.session_status where variable_name like 'key_%' and variable_name != 'Key_blocks_unused';
305+
select variable_value into @key_blocks_unused from information_schema.session_status where variable_name = 'Key_blocks_unused';
306306
--replace_column 7 #
307307
select * from information_schema.key_caches where segment_number is null;
308308

@@ -334,8 +334,8 @@ update t1 set p=3 where p=1;
334334
update t2 set i=2 where i=1;
335335

336336

337-
--replace_result 1800 KEY_BLOCKS_UNUSED 1794 KEY_BLOCKS_UNUSED 1656 KEY_BLOCKS_UNUSED 1775 KEY_BLOCKS_UNUSED
338-
show status like 'key_%';
337+
select * from information_schema.session_status where variable_name like 'key_%' and variable_name != 'Key_blocks_unused';
338+
select variable_value < @key_blocks_unused from information_schema.session_status where variable_name = 'Key_blocks_unused';
339339
--replace_column 7 #
340340
select * from information_schema.key_caches where segment_number is null;
341341

@@ -359,8 +359,8 @@ select * from t2;
359359
update t1 set p=3 where p=1;
360360
update t2 set i=2 where i=1;
361361

362-
--replace_result 1804 KEY_BLOCKS_UNUSED 1801 KEY_BLOCKS_UNUSED 1663 KEY_BLOCKS_UNUSED 1782 KEY_BLOCKS_UNUSED
363-
show status like 'key_%';
362+
select * from information_schema.session_status where variable_name like 'key_%' and variable_name != 'Key_blocks_unused';
363+
select variable_value = @key_blocks_unused from information_schema.session_status where variable_name = 'Key_blocks_unused';
364364
--replace_column 7 #
365365
select * from information_schema.key_caches where segment_number is null;
366366

0 commit comments

Comments
 (0)