diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-05-22 09:20:20 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-05-22 09:46:51 +0300 |
commit | 70505dd45bd36516206eeeb5dcaa28e5f5a1d6dd (patch) | |
tree | 14d0c4dba49e36dc0d80c1ba99757b4074781d2d /sql/lock.cc | |
parent | 7edadde72eb23e9110db8cea810c023104e9d15e (diff) | |
parent | 13a350ac29eeb43153c7bca65b73b5dfa9f8ffb5 (diff) | |
download | mariadb-git-70505dd45bd36516206eeeb5dcaa28e5f5a1d6dd.tar.gz |
Merge 10.1 into 10.2
Diffstat (limited to 'sql/lock.cc')
-rw-r--r-- | sql/lock.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/lock.cc b/sql/lock.cc index a51c34365fa..06cb00fe32d 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -422,6 +422,7 @@ void mysql_unlock_tables(THD *thd, MYSQL_LOCK *sql_lock) void mysql_unlock_tables(THD *thd, MYSQL_LOCK *sql_lock, bool free_lock) { DBUG_ENTER("mysql_unlock_tables"); + bool errors= thd->is_error(); THD_STAGE_INFO(thd, stage_unlocking_tables); if (sql_lock->table_count) @@ -430,6 +431,8 @@ void mysql_unlock_tables(THD *thd, MYSQL_LOCK *sql_lock, bool free_lock) 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; } |