From c6aaa3f227ac3980b1d4e29651300e96cc539728 Mon Sep 17 00:00:00 2001 From: Roman Nozdrin Date: Tue, 14 Jan 2020 22:44:35 +0000 Subject: [PATCH] This commit fixes MDB crash that happens when table lock timeout fires with multiply DML run in separate transactions. This commit also fixes GCC unused variable warning. --- dbcon/mysql/ha_mcs_impl.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dbcon/mysql/ha_mcs_impl.cpp b/dbcon/mysql/ha_mcs_impl.cpp index 3b71dd5f9..a417ea990 100644 --- a/dbcon/mysql/ha_mcs_impl.cpp +++ b/dbcon/mysql/ha_mcs_impl.cpp @@ -2206,9 +2206,7 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi) //@Bug 2540. Set error status instead of warning thd->raise_error_printf(ER_INTERNAL_ERROR, errorMsg.c_str()); ci->rc = b; - // WIP - //thd->get_stmt_da()->set_overwrite_status(true); - //cout << " error status " << ci->rc << endl; + rc = ER_INTERNAL_ERROR; } if (b == dmlpackageprocessor::DMLPackageProcessor::IDBRANGE_WARNING) @@ -2249,7 +2247,7 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi) delete ci->dmlProc; ci->dmlProc = NULL; - return 0; + return rc; } } //anon namespace