summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2003-05-26 20:48:40 +0300
committermonty@mashka.mysql.fi <>2003-05-26 20:48:40 +0300
commite436736d29dcde08eee20b49e0c6c148b8b6dd02 (patch)
treed114eefb7420ba742d8c275a4841b0c8aeedaeb0 /sql/sql_update.cc
parentbeb29e1bce09a4a36d6de982eed31de928b59ed1 (diff)
downloadmariadb-git-e436736d29dcde08eee20b49e0c6c148b8b6dd02.tar.gz
ixed wrong unlock of tables (new bug)
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 62fcb02163d..1f6364ec427 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -338,14 +338,7 @@ int mysql_update(THD *thd,
This must be before binlog writing and ha_autocommit_...
*/
if (updated)
- {
query_cache_invalidate3(thd, table_list, 1);
- }
- if (thd->lock)
- {
- mysql_unlock_tables(thd, thd->lock);
- thd->lock=0;
- }
transactional_table= table->file->has_transactions();
log_delayed= (transactional_table || table->tmp_table);
@@ -368,6 +361,12 @@ int mysql_update(THD *thd,
error=1;
}
+ if (thd->lock)
+ {
+ mysql_unlock_tables(thd, thd->lock);
+ thd->lock=0;
+ }
+
delete select;
free_underlaid_joins(thd, &thd->lex.select_lex);
if (error >= 0)