mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-33881 Userstat skips system tables inconsistently
Fixed that no tables from 'mysql' schema are included in userstat. A beneif of this is that the server is not reading statistics tables if mysql.proc or other tables in mysql is accessed.
This commit is contained in:
@ -122,12 +122,16 @@ set @@global.general_log=@save_general_log;
|
||||
--echo #
|
||||
create function f() returns int return (select 1 from performance_schema.threads);
|
||||
set global userstat= 1;
|
||||
create table t1 (a int primary key);
|
||||
insert into t1 values (1),(2);
|
||||
select * from t1 where a=1;
|
||||
--error ER_SUBQUERY_NO_1_ROW
|
||||
select f() from information_schema.table_statistics;
|
||||
--error ER_SUBQUERY_NO_1_ROW
|
||||
select f() from information_schema.index_statistics;
|
||||
set global userstat= 0;
|
||||
drop function f;
|
||||
drop table t1;
|
||||
--enable_ps2_protocol
|
||||
|
||||
--echo #
|
||||
@ -145,7 +149,9 @@ set global userstat= 1;
|
||||
create or replace table t1 (a int, key(a)) engine=MyISAM;
|
||||
insert into t1 values (1),(2),(3),(4);
|
||||
flush index_statistics;
|
||||
--disable_ps2_protocol
|
||||
select a from t1 where a in ( select a from t1 );
|
||||
--enable_ps2_protocol
|
||||
show index_statistics;
|
||||
drop table t1;
|
||||
set global userstat=@save_userstat;
|
||||
|
Reference in New Issue
Block a user