diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
commit | 06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/temp_table_frm.test | |
parent | Initial commit. (diff) | |
download | mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/temp_table_frm.test')
-rw-r--r-- | mysql-test/main/temp_table_frm.test | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/main/temp_table_frm.test b/mysql-test/main/temp_table_frm.test new file mode 100644 index 00000000..47d2fc40 --- /dev/null +++ b/mysql-test/main/temp_table_frm.test @@ -0,0 +1,27 @@ +#View cannot has temporary table in definition +-- source include/no_view_protocol.inc + +# +# MDEV-4260 Don't create frm files for temporary tables +# + + +# Ensure we don't overflow the internal heap table size in the join +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; +set @@session.max_heap_table_size=16*1024*1024; +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`; +--list_files $tmpdir/ #sql* +truncate table t2; +select variable_name, session_status.variable_value - t1.variable_value +from information_schema.session_status join t1 using (variable_name); +set @@use_stat_tables= @save_use_stat_tables; +set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +drop table t1;
\ No newline at end of file |