2022-06-09 05:32:51 +02:00
|
|
|
#View cannot has temporary table in definition
|
|
|
|
-- source include/no_view_protocol.inc
|
|
|
|
|
2014-06-20 11:34:24 +02:00
|
|
|
#
|
|
|
|
# MDEV-4260 Don't create frm files for temporary tables
|
|
|
|
#
|
2014-09-24 22:52:17 +02:00
|
|
|
|
2022-06-09 05:32:51 +02:00
|
|
|
|
2014-09-24 22:52:17 +02:00
|
|
|
# Ensure we don't overflow the internal heap table size in the join
|
2018-05-31 12:21:59 +02:00
|
|
|
set @save_use_stat_tables= @@use_stat_tables;
|
|
|
|
set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
|
|
|
|
|
|
|
|
set @@optimizer_use_condition_selectivity=1;
|
|
|
|
set @@use_stat_tables= NEVER;
|
2014-09-24 22:52:17 +02:00
|
|
|
set @@session.max_heap_table_size=16*1024*1024;
|
2014-06-20 11:34:24 +02:00
|
|
|
create table t1 select * from information_schema.session_status where variable_name like 'Opened%';
|
|
|
|
create temporary table t2 (a int) engine=memory;
|
|
|
|
select variable_name, session_status.variable_value - t1.variable_value
|
|
|
|
from information_schema.session_status join t1 using (variable_name);
|
|
|
|
let $tmpdir= `select @@tmpdir`;
|
2014-06-21 08:56:49 +02:00
|
|
|
--list_files $tmpdir/ #sql*
|
2014-06-20 11:34:24 +02:00
|
|
|
truncate table t2;
|
|
|
|
select variable_name, session_status.variable_value - t1.variable_value
|
|
|
|
from information_schema.session_status join t1 using (variable_name);
|
2018-05-31 12:21:59 +02:00
|
|
|
set @@use_stat_tables= @save_use_stat_tables;
|
|
|
|
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
|
|
|
|
drop table t1;
|