From d40ef57d80639815fb5c64ef07a37d826b943cb8 Mon Sep 17 00:00:00 2001 From: Jon Olav Hauglid Date: Wed, 9 Dec 2009 12:58:52 +0100 Subject: [PATCH] Backport of revno: 3711.1.1 Bug #48725 Assert !thd->is_error() in delayed_get_table() This bug is a regression introduced by the patch for Bug #45949. If the handler thread for INSERT DELAYED was killed by e.g. FLUSH TABLES, the error message is copied from the handler thread to the connection thread. But the error was not reacted on, so the connection thread continued as normal, leading to an eventual assert. No test case added as it would have required sync points to work for handler threads. The plan is to add this in the scope of Bug #48725 / Bug #48541. The patch has been tested with the non-deterministic test case given in the bug description. --- sql/sql_insert.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 666d6400d32..171c5e2cee0 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -2070,6 +2070,7 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd) my_message(ER_QUERY_INTERRUPTED, ER(ER_QUERY_INTERRUPTED), MYF(0)); else my_message(thd.stmt_da->sql_errno(), thd.stmt_da->message(), MYF(0)); + goto error; } } share= table->s;