summaryrefslogtreecommitdiff
path: root/sql/lock.cc
diff options
context:
space:
mode:
authorSachin Setiya <sachin.setiya@mariadb.com>2017-05-30 15:28:52 +0530
committerSachin Setiya <sachin.setiya@mariadb.com>2017-05-30 15:28:52 +0530
commit92209ac6f69974169c543ae82da077f06f2b7c71 (patch)
tree1713781010a286fa9a493781a3eb001af062fd62 /sql/lock.cc
parent0e3170e30d2a4e8f1ed6fd4bbe935355f7370a34 (diff)
parent725e47bfb524f4b1d29076c8777056bedd5f00ea (diff)
downloadmariadb-git-92209ac6f69974169c543ae82da077f06f2b7c71.tar.gz
Merge tag 'mariadb-10.0.31' into 10.0-galera
Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
Diffstat (limited to 'sql/lock.cc')
-rw-r--r--sql/lock.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/lock.cc b/sql/lock.cc
index 7153b85d740..f7b9980ef05 100644
--- a/sql/lock.cc
+++ b/sql/lock.cc
@@ -396,12 +396,15 @@ static int lock_external(THD *thd, TABLE **tables, uint count)
void mysql_unlock_tables(THD *thd, MYSQL_LOCK *sql_lock, bool free_lock)
{
DBUG_ENTER("mysql_unlock_tables");
+ bool errors= thd->is_error();
if (sql_lock->table_count)
unlock_external(thd, sql_lock->table, sql_lock->table_count);
if (sql_lock->lock_count)
thr_multi_unlock(sql_lock->locks, sql_lock->lock_count, 0);
if (free_lock)
my_free(sql_lock);
+ if (!errors)
+ thd->clear_error();
DBUG_VOID_RETURN;
}