diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2014-01-21 14:02:56 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2014-01-21 14:02:56 +0400 |
commit | 41208f6e5b53db6fda2c9b6a6cfd6158c85e46b8 (patch) | |
tree | 798e539379fb5ebf9c69a7b0e4c6db40a9c0ce1e /sql/sql_insert.cc | |
parent | 2ddbe0ec816136ce17a32d7bd14d85eb9bda8078 (diff) | |
download | mariadb-git-41208f6e5b53db6fda2c9b6a6cfd6158c85e46b8.tar.gz |
MDEV-5426: Assertion `toku_ft_needed_unlocked(src_h)' failed (errno=11) ...
- the problem was caused by EXPLAIN INSERT SELECT. For that statement,
the code would call select_insert::prepare2(), which would call
handler->ha_start_bulk_insert(). The corresponding handler->end_bulk_insert()
call is made from select_insert::send_eof or select_insert::abort_result_set
which are never called for EXPLAIN INSERT SELECT.
- Fixed by re-using approach of mysql-5.6: don't call ha_start_bulk_insert() if
we are in EXPLAIN.
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 0acb7e747ad..b764263265e 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -3555,7 +3555,8 @@ int select_insert::prepare2(void) { DBUG_ENTER("select_insert::prepare2"); if (thd->lex->current_select->options & OPTION_BUFFER_RESULT && - thd->locked_tables_mode <= LTM_LOCK_TABLES) + thd->locked_tables_mode <= LTM_LOCK_TABLES && + !thd->lex->describe) table->file->ha_start_bulk_insert((ha_rows) 0); DBUG_RETURN(0); } |