Browse Source
MDEV-15705 Remove global status counter Innodb_pages0_read
MDEV-15705 Remove global status counter Innodb_pages0_read
MDEV-9931 introduced a counter for keeping track of reads of the first page of InnoDB data files, because the original implementation of data-at-rest-encryption for InnoDB introduced new code paths for reading the pages. Ultimately, the extra reads of the first page were removed, and the encryption subsystem will be initialized whenever we first read the first page of each data file, in fil_node_open_file(). It should not be that interesting to observe how many times an InnoDB data file was opened for the first time.pull/757/head
12 changed files with 0 additions and 298 deletions
-
96mysql-test/suite/encryption/r/innodb-first-page-read.result
-
52mysql-test/suite/encryption/r/innodb_lotoftables.result
-
104mysql-test/suite/encryption/t/innodb-first-page-read.test
-
24mysql-test/suite/encryption/t/innodb_lotoftables.test
-
1mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result
-
1mysql-test/suite/innodb/r/monitor.result
-
1storage/innobase/fil/fil0fil.cc
-
2storage/innobase/handler/ha_innodb.cc
-
1storage/innobase/include/srv0mon.h
-
4storage/innobase/include/srv0srv.h
-
11storage/innobase/srv/srv0mon.cc
-
1storage/innobase/srv/srv0srv.cc
@ -1,96 +0,0 @@ |
|||
FLUSH STATUS; |
|||
create database innodb_test; |
|||
use innodb_test; |
|||
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb; |
|||
create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact; |
|||
create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic; |
|||
create table innodb_compressed(c1 bigint not null, b char(200)) engine=innodb row_format=compressed; |
|||
create table innodb_compressed1(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=1; |
|||
create table innodb_compressed2(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=2; |
|||
create table innodb_compressed4(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=4; |
|||
create table innodb_compressed8(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=8; |
|||
create table innodb_compressed16(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=16; |
|||
create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant; |
|||
create table innodb_pagecomp(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes; |
|||
create table innodb_pagecomp1(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=1; |
|||
create table innodb_pagecomp2(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=2; |
|||
create table innodb_pagecomp3(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=3; |
|||
create table innodb_pagecomp4(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=4; |
|||
create table innodb_pagecomp5(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=5; |
|||
create table innodb_pagecomp6(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=6; |
|||
create table innodb_pagecomp7(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=7; |
|||
create table innodb_pagecomp8(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=8; |
|||
create table innodb_pagecomp9(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=9; |
|||
create table innodb_datadir1(c1 bigint not null, b char(200)) engine=innodb DATA DIRECTORY='MYSQL_TMP_DIR'; |
|||
create table innodb_datadir2(c1 bigint not null, b char(200)) engine=innodb row_format=compressed DATA DIRECTORY='MYSQL_TMP_DIR'; |
|||
create table innodb_datadir3(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes DATA DIRECTORY='MYSQL_TMP_DIR'; |
|||
begin; |
|||
insert into innodb_normal values (1,'secret'); |
|||
insert into innodb_compact select * from innodb_normal; |
|||
insert into innodb_dynamic select * from innodb_normal; |
|||
insert into innodb_compressed select * from innodb_normal; |
|||
insert into innodb_compressed1 select * from innodb_normal; |
|||
insert into innodb_compressed2 select * from innodb_normal; |
|||
insert into innodb_compressed4 select * from innodb_normal; |
|||
insert into innodb_compressed8 select * from innodb_normal; |
|||
insert into innodb_compressed16 select * from innodb_normal; |
|||
insert into innodb_redundant select * from innodb_normal; |
|||
insert into innodb_pagecomp select * from innodb_normal; |
|||
insert into innodb_pagecomp1 select * from innodb_normal; |
|||
insert into innodb_pagecomp2 select * from innodb_normal; |
|||
insert into innodb_pagecomp3 select * from innodb_normal; |
|||
insert into innodb_pagecomp4 select * from innodb_normal; |
|||
insert into innodb_pagecomp5 select * from innodb_normal; |
|||
insert into innodb_pagecomp6 select * from innodb_normal; |
|||
insert into innodb_pagecomp7 select * from innodb_normal; |
|||
insert into innodb_pagecomp8 select * from innodb_normal; |
|||
insert into innodb_pagecomp9 select * from innodb_normal; |
|||
insert into innodb_datadir1 select * from innodb_normal; |
|||
insert into innodb_datadir2 select * from innodb_normal; |
|||
insert into innodb_datadir3 select * from innodb_normal; |
|||
commit; |
|||
FLUSH STATUS; |
|||
# Restart server and see how many page 0's are read |
|||
# result should actual number of tables except remote tables could be read twice |
|||
# i.e. < 23 + 3*2 = 29 |
|||
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read'; |
|||
VARIABLE_VALUE <= 29 |
|||
1 |
|||
use innodb_test; |
|||
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read'; |
|||
VARIABLE_VALUE <= 29 |
|||
1 |
|||
use test; |
|||
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read'; |
|||
VARIABLE_VALUE <= 29 |
|||
1 |
|||
set global innodb_encrypt_tables=OFF; |
|||
# wait until tables are decrypted |
|||
# result should be actual number of tables except remote tables could be read twice |
|||
# i.e. < 23 + 3*2 = 29 |
|||
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read'; |
|||
VARIABLE_VALUE <= 29 |
|||
1 |
|||
use innodb_test; |
|||
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read'; |
|||
VARIABLE_VALUE <= 29 |
|||
1 |
|||
use test; |
|||
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read'; |
|||
VARIABLE_VALUE <= 29 |
|||
1 |
|||
FLUSH STATUS; |
|||
# restart and see number read page 0 |
|||
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read'; |
|||
VARIABLE_VALUE <= 29 |
|||
1 |
|||
use innodb_test; |
|||
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read'; |
|||
VARIABLE_VALUE <= 29 |
|||
1 |
|||
use test; |
|||
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read'; |
|||
VARIABLE_VALUE <= 29 |
|||
1 |
|||
drop database innodb_test; |
|||
FLUSH STATUS; |
@ -1,104 +0,0 @@ |
|||
-- source include/have_innodb.inc |
|||
-- source include/have_file_key_management_plugin.inc |
|||
-- source include/not_embedded.inc |
|||
|
|||
FLUSH STATUS; |
|||
|
|||
create database innodb_test; |
|||
use innodb_test; |
|||
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb; |
|||
create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact; |
|||
create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic; |
|||
create table innodb_compressed(c1 bigint not null, b char(200)) engine=innodb row_format=compressed; |
|||
create table innodb_compressed1(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=1; |
|||
create table innodb_compressed2(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=2; |
|||
create table innodb_compressed4(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=4; |
|||
create table innodb_compressed8(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=8; |
|||
create table innodb_compressed16(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=16; |
|||
create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant; |
|||
create table innodb_pagecomp(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes; |
|||
create table innodb_pagecomp1(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=1; |
|||
create table innodb_pagecomp2(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=2; |
|||
create table innodb_pagecomp3(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=3; |
|||
create table innodb_pagecomp4(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=4; |
|||
create table innodb_pagecomp5(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=5; |
|||
create table innodb_pagecomp6(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=6; |
|||
create table innodb_pagecomp7(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=7; |
|||
create table innodb_pagecomp8(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=8; |
|||
create table innodb_pagecomp9(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=9; |
|||
|
|||
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR |
|||
eval create table innodb_datadir1(c1 bigint not null, b char(200)) engine=innodb DATA DIRECTORY='$MYSQL_TMP_DIR'; |
|||
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR |
|||
eval create table innodb_datadir2(c1 bigint not null, b char(200)) engine=innodb row_format=compressed DATA DIRECTORY='$MYSQL_TMP_DIR'; |
|||
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR |
|||
eval create table innodb_datadir3(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes DATA DIRECTORY='$MYSQL_TMP_DIR'; |
|||
|
|||
begin; |
|||
insert into innodb_normal values (1,'secret'); |
|||
insert into innodb_compact select * from innodb_normal; |
|||
insert into innodb_dynamic select * from innodb_normal; |
|||
insert into innodb_compressed select * from innodb_normal; |
|||
insert into innodb_compressed1 select * from innodb_normal; |
|||
insert into innodb_compressed2 select * from innodb_normal; |
|||
insert into innodb_compressed4 select * from innodb_normal; |
|||
insert into innodb_compressed8 select * from innodb_normal; |
|||
insert into innodb_compressed16 select * from innodb_normal; |
|||
insert into innodb_redundant select * from innodb_normal; |
|||
insert into innodb_pagecomp select * from innodb_normal; |
|||
insert into innodb_pagecomp1 select * from innodb_normal; |
|||
insert into innodb_pagecomp2 select * from innodb_normal; |
|||
insert into innodb_pagecomp3 select * from innodb_normal; |
|||
insert into innodb_pagecomp4 select * from innodb_normal; |
|||
insert into innodb_pagecomp5 select * from innodb_normal; |
|||
insert into innodb_pagecomp6 select * from innodb_normal; |
|||
insert into innodb_pagecomp7 select * from innodb_normal; |
|||
insert into innodb_pagecomp8 select * from innodb_normal; |
|||
insert into innodb_pagecomp9 select * from innodb_normal; |
|||
insert into innodb_datadir1 select * from innodb_normal; |
|||
insert into innodb_datadir2 select * from innodb_normal; |
|||
insert into innodb_datadir3 select * from innodb_normal; |
|||
commit; |
|||
|
|||
FLUSH STATUS; |
|||
|
|||
--echo # Restart server and see how many page 0's are read |
|||
--source include/restart_mysqld.inc |
|||
|
|||
--echo # result should actual number of tables except remote tables could be read twice |
|||
--echo # i.e. < 23 + 3*2 = 29 |
|||
|
|||
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read'; |
|||
use innodb_test; |
|||
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read'; |
|||
use test; |
|||
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read'; |
|||
|
|||
set global innodb_encrypt_tables=OFF; |
|||
|
|||
--echo # wait until tables are decrypted |
|||
--let $wait_condition=SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 |
|||
--source include/wait_condition.inc |
|||
|
|||
--echo # result should be actual number of tables except remote tables could be read twice |
|||
--echo # i.e. < 23 + 3*2 = 29 |
|||
|
|||
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read'; |
|||
use innodb_test; |
|||
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read'; |
|||
use test; |
|||
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read'; |
|||
|
|||
FLUSH STATUS; |
|||
|
|||
--echo # restart and see number read page 0 |
|||
-- source include/restart_mysqld.inc |
|||
|
|||
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read'; |
|||
use innodb_test; |
|||
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read'; |
|||
use test; |
|||
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read'; |
|||
|
|||
drop database innodb_test; |
|||
FLUSH STATUS; |
Write
Preview
Loading…
Cancel
Save
Reference in new issue