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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user