Commit acf27225 authored by Sergey Petrunya's avatar Sergey Petrunya

Post-merge fixes:

- Fix derived_view.test to work, and enable it
- Let subselect*.test do "DROP TABLE IF EXISTS" before they attempt to create the table.
parent e19588dc
This diff is collapsed.
drop table if exists t1,t2,t3,t4,t5,t6;
drop table if exists t0,t1,t2,t3,t4,t5,t6;
drop view if exists v1, v2;
set @subselect4_tmp= @@optimizer_switch;
set optimizer_switch='semijoin=on,firstmatch=on,loosescan=on';
......
drop table if exists t0,t1,t2,t3,t4,t5,t6,t7,t8,t9;
set optimizer_switch='subquery_cache=on';
create table t1 (a int, b int);
insert into t1 values (1,2),(3,4),(1,2),(3,4),(3,4),(4,5),(4,5),(5,6),(5,6),(4,5);
......
......@@ -20,4 +20,3 @@ archive-big : Bug#11817185 2011-03-10 Anitha Disabled since this le
log_tables-big : Bug#11756699 2010-11-15 mattiasj report already exists
mysql_embedded : Bug#12561297 2011-06-15 New test failing on all platforms
tablespace : disabled in MariaDB (no TABLESPACE table attribute)
derived_view : SergeyP
# General purpose bug fix tests go here : subselect.test too large
--disable_warnings
drop table if exists t1,t2,t3,t4,t5,t6;
drop table if exists t0,t1,t2,t3,t4,t5,t6;
drop view if exists v1, v2;
--enable_warnings
......
--disable_warnings
drop table if exists t0,t1,t2,t3,t4,t5,t6,t7,t8,t9;
--enable_warnings
set optimizer_switch='subquery_cache=on';
create table t1 (a int, b int);
......
......@@ -2681,9 +2681,14 @@ bool subselect_union_engine::no_rows()
void subselect_uniquesubquery_engine::cleanup()
{
DBUG_ENTER("subselect_uniquesubquery_engine::cleanup");
/* Tell handler we don't need the index anymore */
if (tab->table->file->inited)
tab->table->file->ha_index_end();
/*
Note for mergers: we don't have to, and actually must not de-initialize
tab->table->file here.
- We don't have to, because free_tmp_table() will call ha_index_or_rnd_end
- We must not do it, because tab->table may be a derived table which
has been already dropped by close_thread_tables(), while we here are
called from cleanup_items()
*/
DBUG_VOID_RETURN;
}
......
......@@ -14793,6 +14793,7 @@ free_tmp_table(THD *thd, TABLE *entry)
if (entry->file && entry->created)
{
entry->file->ha_index_or_rnd_end();
if (entry->db_stat)
entry->file->ha_drop_table(entry->s->table_name.str);
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment