diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2013-07-08 20:21:27 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2013-07-08 20:21:27 +0400 |
commit | c3e70a010443d5889f7388b7dbc6bd3bcfb62a21 (patch) | |
tree | f6f11033396f220f8c5ba3c4dd7e82b7b01776ba /sql | |
parent | 09e2501f0d85f8349ad065f0074271ad2455b1ef (diff) | |
download | mariadb-git-c3e70a010443d5889f7388b7dbc6bd3bcfb62a21.tar.gz |
Fix assert failures in main.merge test (line 234) and main.merge_mmap (line 44)
- After the merge from mysql-5.6, open_tables() did not call
open_and_process_table() for temporary table. The logic was that temporary
tables were already opened when mysql_execute_command() has called
open_temporary_tables().
This worked for the most part, except for temporary tables of type MERGE. for
which open_and_process_table() must call
table->file->extra(HA_EXTRA_ADD_CHILDREN_LIST).
Failure to make this call resulted in crash further in execution.
tables->table->file->extra(HA_EXTRA_ADD_CHILDREN_LIST)
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_base.cc | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index b160c68f7c2..7613facfe67 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -4514,7 +4514,6 @@ open_and_process_table(THD *thd, LEX *lex, TABLE_LIST *tables, bool safe_to_ignore_table= FALSE; DBUG_ENTER("open_and_process_table"); DEBUG_SYNC(thd, "open_and_process_table"); - DBUG_ASSERT(!tables->table); /* Ignore placeholders for derived tables. After derived tables @@ -5213,14 +5212,6 @@ restart: for (tables= *table_to_open; tables; table_to_open= &tables->next_global, tables= tables->next_global) { - /* Ignore temporary tables, as these has already been opened */ - if (tables->table) - { - DBUG_ASSERT(is_temporary_table(tables)); - /* We have to increment the counter for lock_tables */ - (*counter)++; - continue; - } error= open_and_process_table(thd, thd->lex, tables, counter, flags, prelocking_strategy, has_prelocking_list, &ot_ctx, |