mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Bug#46374 crash, INSERT INTO t1 uses function, function modifies t1
An error occuring in the execution of a stored procedure, called from do_select is masked, since the error condition is not propagated back to the caller (join->conds->val_int() returns a result value, and not an error code) An explicit check was added to see if the thd error code has been set, and if so, the loop status is set to the error state. Backport from 6.0-codebase (revid: 2617.68.31)
This commit is contained in:
@ -11096,6 +11096,13 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
|
||||
fields);
|
||||
rc= join->result->send_data(*columns_list);
|
||||
}
|
||||
/*
|
||||
An error can happen when evaluating the conds
|
||||
(the join condition and piece of where clause
|
||||
relevant to this join table).
|
||||
*/
|
||||
if (join->thd->is_error())
|
||||
error= NESTED_LOOP_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user