1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

ixed wrong unlock of tables (new bug)

sql/sql_delete.cc:
  Comment cleanup
sql/sql_insert.cc:
  Comment cleanup
sql/sql_load.cc:
  Comment cleanup
sql/sql_update.cc:
  Fixed wrong unlock of tables.
  (Unlock must be done after writing to binary log
This commit is contained in:
unknown
2003-05-26 20:48:40 +03:00
parent 926add9c88
commit da9bf1dec3
4 changed files with 18 additions and 19 deletions

View File

@@ -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)