diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-12-08 22:54:58 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-12-08 23:19:55 +0100 |
commit | 03dabfa84d6bc9a8197c8d9fbe80f2a7f6a5b6ac (patch) | |
tree | 1f9544efa27f3fa5f6a2c1fcdb40cf95dc7933ff /sql/item_func.cc | |
parent | ab65db6d3fc0c876130cefb45a63cdaad4018f8c (diff) | |
download | mariadb-git-03dabfa84d6bc9a8197c8d9fbe80f2a7f6a5b6ac.tar.gz |
MDEV-10713: signal 11 error on multi-table update - crash in handler::increment_statistics or in make_select or assertion failure pfs_thread == ((PFS_thread*) pthread_getspecific((THR_PFS)))
Different fix. Don't allow Item_func_sp to be evaluated unless
all tables are prelocked.
Extend the test case to make sure Item_func_sp::val_str is called
(the table must have at least one row for that).
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index 6c80c7d3d86..89d3cd9e32a 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -6778,7 +6778,8 @@ Item_func_sp::init_result_field(THD *thd) bool Item_func_sp::is_expensive() { - return !(m_sp->m_chistics->detistic); + return !m_sp->m_chistics->detistic || + current_thd->locked_tables_mode < LTM_LOCK_TABLES; } |