Enable mysqlcheck and flush_read_lock tests
- Updated results - Run mysqlcheck without --user-stat-tables=PREFERABLY to keep results consistent - Don't allow one to run analyze table under FTWRL as analyze table nowadays has to update status tables.
This commit is contained in:
parent
2b7e080fae
commit
0cc7c6085e
@ -19,6 +19,4 @@ innodb_bug12902967 : broken upstream
|
|||||||
file_contents : MDEV-6526 these files are not installed anymore
|
file_contents : MDEV-6526 these files are not installed anymore
|
||||||
max_statement_time : cannot possibly work, depends on timing
|
max_statement_time : cannot possibly work, depends on timing
|
||||||
partition_open_files_limit : open_files_limit check broken by MDEV-18360
|
partition_open_files_limit : open_files_limit check broken by MDEV-18360
|
||||||
mysqlcheck : special tables like proxy , host specific to a system are shown
|
|
||||||
flush_read_lock : special tables like proxy , host specific to a system are shown
|
|
||||||
join_cache : enable after MDEV-17752 is fixed
|
join_cache : enable after MDEV-17752 is fixed
|
||||||
|
@ -159,11 +159,10 @@ Success: FTWRL is blocked when 'alter event e1 comment 'test'' is active in anot
|
|||||||
#
|
#
|
||||||
# 2) ANALYZE TABLE statement is compatible with FTWRL.
|
# 2) ANALYZE TABLE statement is compatible with FTWRL.
|
||||||
# See Bug#43336 ANALYZE and OPTIMIZE do not honour
|
# See Bug#43336 ANALYZE and OPTIMIZE do not honour
|
||||||
# --read-only for a discussion why.
|
# --read-only as they update status tables.
|
||||||
#
|
#
|
||||||
Success: Was able to run 'analyze table t1_base' under FTWRL.
|
Success: Was not able to run 'analyze table t1_base' under FTWRL.
|
||||||
Success: Was able to run 'analyze table t1_base' with FTWRL active in another connection.
|
Success: 'analyze table t1_base' is blocked by FTWRL active in another connection.
|
||||||
Success: Was able to run FTWRL while 'analyze table t1_base' was active in another connection.
|
|
||||||
#
|
#
|
||||||
# 3) BEGIN, ROLLBACK and COMMIT statements.
|
# 3) BEGIN, ROLLBACK and COMMIT statements.
|
||||||
# BEGIN and ROLLBACK are compatible with FTWRL.
|
# BEGIN and ROLLBACK are compatible with FTWRL.
|
||||||
@ -1409,10 +1408,8 @@ set autocommit= 1;
|
|||||||
# 39.1.a) ANALYZE TABLE for transactional table is incompatible with
|
# 39.1.a) ANALYZE TABLE for transactional table is incompatible with
|
||||||
# FTWRL.
|
# FTWRL.
|
||||||
flush tables with read lock;
|
flush tables with read lock;
|
||||||
# Implicit commits are allowed under FTWRL.
|
|
||||||
analyze table t3_trans;
|
analyze table t3_trans;
|
||||||
Table Op Msg_type Msg_text
|
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
||||||
test.t3_trans analyze status OK
|
|
||||||
unlock tables;
|
unlock tables;
|
||||||
#
|
#
|
||||||
connection con1;
|
connection con1;
|
||||||
@ -1425,6 +1422,7 @@ unlock tables;
|
|||||||
connection default;
|
connection default;
|
||||||
# Reap ANALYZE TABLE
|
# Reap ANALYZE TABLE
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
|
test.t3_trans analyze status Engine-independent statistics collected
|
||||||
test.t3_trans analyze status OK
|
test.t3_trans analyze status OK
|
||||||
#
|
#
|
||||||
# 39.1.b) CHECK TABLE for transactional table is compatible with FTWRL.
|
# 39.1.b) CHECK TABLE for transactional table is compatible with FTWRL.
|
||||||
@ -1460,7 +1458,7 @@ Success: Was able to run 'repair table t3_temp_trans' with FTWRL active in anoth
|
|||||||
Success: Was able to run FTWRL while 'repair table t3_temp_trans' was active in another connection.
|
Success: Was able to run FTWRL while 'repair table t3_temp_trans' was active in another connection.
|
||||||
#
|
#
|
||||||
# And ANALYZE TABLE:
|
# And ANALYZE TABLE:
|
||||||
Success: Was able to run 'analyze table t3_temp_trans' under FTWRL.
|
Error: Wasn't able to run 'analyze table t3_temp_trans' under FTWRL!
|
||||||
Success: Was able to run 'analyze table t3_temp_trans' with FTWRL active in another connection.
|
Success: Was able to run 'analyze table t3_temp_trans' with FTWRL active in another connection.
|
||||||
Success: Was able to run FTWRL while 'analyze table t3_temp_trans' was active in another connection.
|
Success: Was able to run FTWRL while 'analyze table t3_temp_trans' was active in another connection.
|
||||||
#
|
#
|
||||||
|
@ -199,11 +199,13 @@ let $cleanup_stmt1= alter event e1 comment '';
|
|||||||
--echo #
|
--echo #
|
||||||
--echo # 2) ANALYZE TABLE statement is compatible with FTWRL.
|
--echo # 2) ANALYZE TABLE statement is compatible with FTWRL.
|
||||||
--echo # See Bug#43336 ANALYZE and OPTIMIZE do not honour
|
--echo # See Bug#43336 ANALYZE and OPTIMIZE do not honour
|
||||||
--echo # --read-only for a discussion why.
|
--echo # --read-only as they update status tables.
|
||||||
--echo #
|
--echo #
|
||||||
|
let $skip_3rd_check= 1;
|
||||||
let $statement= analyze table t1_base;
|
let $statement= analyze table t1_base;
|
||||||
let $cleanup_stmt= ;
|
let $cleanup_stmt= ;
|
||||||
--source include/check_ftwrl_compatible.inc
|
--source include/check_ftwrl_incompatible.inc
|
||||||
|
let $skip_3rd_check= ;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # 3) BEGIN, ROLLBACK and COMMIT statements.
|
--echo # 3) BEGIN, ROLLBACK and COMMIT statements.
|
||||||
@ -1712,7 +1714,7 @@ set autocommit= 1;
|
|||||||
--echo # 39.1.a) ANALYZE TABLE for transactional table is incompatible with
|
--echo # 39.1.a) ANALYZE TABLE for transactional table is incompatible with
|
||||||
--echo # FTWRL.
|
--echo # FTWRL.
|
||||||
flush tables with read lock;
|
flush tables with read lock;
|
||||||
--echo # Implicit commits are allowed under FTWRL.
|
--error ER_CANT_UPDATE_WITH_READLOCK
|
||||||
analyze table t3_trans;
|
analyze table t3_trans;
|
||||||
unlock tables;
|
unlock tables;
|
||||||
--echo #
|
--echo #
|
||||||
|
1
mysql-test/main/mysqlcheck-master.opt
Normal file
1
mysql-test/main/mysqlcheck-master.opt
Normal file
@ -0,0 +1 @@
|
|||||||
|
--use-stat-tables=NEVER
|
@ -468,11 +468,11 @@ drop database mysqltest1;
|
|||||||
#
|
#
|
||||||
create table t1(a int);
|
create table t1(a int);
|
||||||
insert into t1 (a) values (1), (2), (3);
|
insert into t1 (a) values (1), (2), (3);
|
||||||
select * from mysql.column_stats;
|
select db_name,table_name,column_name,min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type from mysql.column_stats order by db_name,table_name;
|
||||||
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
|
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type
|
||||||
test.t1 Engine-independent statistics collected
|
test.t1 Engine-independent statistics collected
|
||||||
status : OK
|
status : OK
|
||||||
select * from mysql.column_stats where db_name = 'test' and table_name = 't1';
|
select db_name,table_name,column_name,min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type from mysql.column_stats where db_name = 'test' and table_name = 't1' order by db_name,table_name;
|
||||||
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
|
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type
|
||||||
test t1 a 1 3 0.0000 4.0000 1.0000 0 NULL NULL
|
test t1 a 1 3 0.0000 4.0000 1.0000 254 DOUBLE_PREC_HB
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
@ -403,7 +403,7 @@ drop database mysqltest1;
|
|||||||
--echo #
|
--echo #
|
||||||
create table t1(a int);
|
create table t1(a int);
|
||||||
insert into t1 (a) values (1), (2), (3);
|
insert into t1 (a) values (1), (2), (3);
|
||||||
select * from mysql.column_stats;
|
select db_name,table_name,column_name,min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type from mysql.column_stats order by db_name,table_name;
|
||||||
--exec $MYSQL_CHECK --analyze test t1 --persistent
|
--exec $MYSQL_CHECK --analyze test t1 --persistent
|
||||||
select * from mysql.column_stats where db_name = 'test' and table_name = 't1';
|
select db_name,table_name,column_name,min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type from mysql.column_stats where db_name = 'test' and table_name = 't1' order by db_name,table_name;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
@ -1305,6 +1305,9 @@ bool Sql_cmd_analyze_table::execute(THD *thd)
|
|||||||
if (check_table_access(thd, SELECT_ACL | INSERT_ACL, first_table,
|
if (check_table_access(thd, SELECT_ACL | INSERT_ACL, first_table,
|
||||||
FALSE, UINT_MAX, FALSE))
|
FALSE, UINT_MAX, FALSE))
|
||||||
goto error;
|
goto error;
|
||||||
|
if (thd->has_read_only_protection())
|
||||||
|
goto error;
|
||||||
|
|
||||||
WSREP_TO_ISOLATION_BEGIN_WRTCHK(NULL, NULL, first_table);
|
WSREP_TO_ISOLATION_BEGIN_WRTCHK(NULL, NULL, first_table);
|
||||||
res= mysql_admin_table(thd, first_table, &m_lex->check_opt,
|
res= mysql_admin_table(thd, first_table, &m_lex->check_opt,
|
||||||
"analyze", lock_type, 1, 0, 0, 0,
|
"analyze", lock_type, 1, 0, 0, 0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user