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).
This commit is contained in:
parent
ab65db6d3f
commit
03dabfa84d
@ -8027,6 +8027,7 @@ CREATE TABLE `t1` (
|
|||||||
CREATE TABLE `t2` (
|
CREATE TABLE `t2` (
|
||||||
`ap_close_to` varchar(8) COLLATE utf8_bin DEFAULT NULL
|
`ap_close_to` varchar(8) COLLATE utf8_bin DEFAULT NULL
|
||||||
) DEFAULT CHARSET=utf8 COLLATE=utf8_bin ;
|
) DEFAULT CHARSET=utf8 COLLATE=utf8_bin ;
|
||||||
|
insert t1 values (1);
|
||||||
CREATE FUNCTION `f1`(`P_DC_CD` VARBINARY(50), `P_SYS_DATE` DATETIME) RETURNS datetime
|
CREATE FUNCTION `f1`(`P_DC_CD` VARBINARY(50), `P_SYS_DATE` DATETIME) RETURNS datetime
|
||||||
DETERMINISTIC
|
DETERMINISTIC
|
||||||
SQL SECURITY INVOKER
|
SQL SECURITY INVOKER
|
||||||
|
@ -9316,6 +9316,7 @@ CREATE TABLE `t1` (
|
|||||||
CREATE TABLE `t2` (
|
CREATE TABLE `t2` (
|
||||||
`ap_close_to` varchar(8) COLLATE utf8_bin DEFAULT NULL
|
`ap_close_to` varchar(8) COLLATE utf8_bin DEFAULT NULL
|
||||||
) DEFAULT CHARSET=utf8 COLLATE=utf8_bin ;
|
) DEFAULT CHARSET=utf8 COLLATE=utf8_bin ;
|
||||||
|
insert t1 values (1);
|
||||||
|
|
||||||
|
|
||||||
--delimiter $$
|
--delimiter $$
|
||||||
|
@ -3294,7 +3294,7 @@ public:
|
|||||||
if (result_type() == ROW_RESULT)
|
if (result_type() == ROW_RESULT)
|
||||||
orig_item->bring_value();
|
orig_item->bring_value();
|
||||||
}
|
}
|
||||||
virtual bool is_expensive() { return orig_item->is_expensive(); }
|
bool is_expensive() { return orig_item->is_expensive(); }
|
||||||
bool is_expensive_processor(uchar *arg)
|
bool is_expensive_processor(uchar *arg)
|
||||||
{ return orig_item->is_expensive_processor(arg); }
|
{ return orig_item->is_expensive_processor(arg); }
|
||||||
bool check_vcol_func_processor(uchar *arg)
|
bool check_vcol_func_processor(uchar *arg)
|
||||||
|
@ -6778,7 +6778,8 @@ Item_func_sp::init_result_field(THD *thd)
|
|||||||
|
|
||||||
bool Item_func_sp::is_expensive()
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user