Commit f28f9859 authored by Jon Olav Hauglid's avatar Jon Olav Hauglid

Backport of revno: 2617.65.10

Bug #45067 Assertion `stmt_da->is_error()' in 
           Delayed_insert::open_and_lock_table

The assert was triggered when delayed insert was killed by another 
connection using mysql_notify_thread_having_shared_lock().
During handling of thd->killed, thd.fatal_error() was called without
a previous call to my_error() which triggered the assert.
This patch allows the assert to pass if thd->killed has been set.
parent c20afa6d
......@@ -2216,7 +2216,7 @@ class THD :public Statement,
*/
inline void fatal_error()
{
DBUG_ASSERT(main_da.is_error());
DBUG_ASSERT(stmt_da->is_error() || killed);
is_fatal_error= 1;
DBUG_PRINT("error",("Fatal error set"));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment