1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-34605 Fix tmp_table_count-7586

This test ran `show status like '%Created_tmp%'`. This captures
`Created_tmp_files` as well as the intended `Created_tmp_tables`.
In 11.5, the former got moved to `FLUSH GLOBAL`, so when testing, the
result can now be random.

This fix makes the test just use `Created_tmp_tables`.
This commit is contained in:
Andrew Hutchings
2024-07-30 15:18:12 +01:00
committed by Daniel Black
parent 2f4b0ba328
commit 06a7352d33
2 changed files with 10 additions and 20 deletions

View File

@ -14,14 +14,14 @@ create view v2 as select a from t2;
flush status;
select * from v2;
--disable_ps_protocol
show status like '%Created_tmp%';
show status like '%Created_tmp_tables%';
--enable_ps_protocol
explain select * from v2;
select * from (select * from t2) T1;
--disable_ps_protocol
show status like '%Created_tmp%';
show status like '%Created_tmp_tables%';
--enable_ps_protocol
explain select * from (select * from t2) T1;
@ -44,7 +44,7 @@ flush status;
CREATE TABLE t3 SELECT * FROM t1 WHERE a IN (SELECT * FROM t2 GROUP BY a HAVING a > 1);
--echo # Performance schema should be the same as "Created_tmp_tables" variable below
select sum(created_tmp_tables) from performance_schema.events_statements_history_long;
show status like '%Created_tmp%';
show status like '%Created_tmp_tables%';
drop table t3;
set @@optimizer_switch="firstmatch=off";
@ -54,7 +54,7 @@ flush status;
CREATE TABLE t3 SELECT * FROM t1 WHERE a IN (SELECT * FROM t2 GROUP BY a);
--echo # Performance schema should be the same as "Created_tmp_tables" variable below
select sum(created_tmp_tables) from performance_schema.events_statements_history_long;
show status like '%Created_tmp%';
show status like '%Created_tmp_tables%';
set @@optimizer_switch=default;
drop table t1,t2,t3;
@ -63,4 +63,4 @@ truncate table performance_schema.events_statements_history_long;
flush status;
--echo # Performance schema should be the same as "Created_tmp_tables" variable below
select sum(created_tmp_tables) from performance_schema.events_statements_history_long;
show status like '%Created_tmp%';
show status like '%Created_tmp_tables%';