1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

invalidation moved before tables unlocking

sql/sql_delete.cc:
  invalidation moved before tables unlocking
  invalidation on multidelete error (if something changed)
sql/sql_parse.cc:
  invalidation moved to mysql_admin_table
  layout fixing
sql/sql_table.cc:
  invalidation moved to mysql_admin_table
sql/sql_update.cc:
  invalidation moved before tables unlocking
  invalidation on multiupdate error (if something changed)
This commit is contained in:
unknown
2002-04-29 00:33:52 +03:00
parent a2ce6c71b8
commit 3c0e609165
5 changed files with 22 additions and 10 deletions

View File

@ -262,6 +262,8 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
info.copied=values_list.elements;
end_delayed_insert(thd);
}
if (info.copied || info.deleted)
query_cache_invalidate3(thd, table_list, 1);
}
else
{
@ -303,6 +305,8 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
}
if (using_transactions)
error=ha_autocommit_or_rollback(thd,error);
if (info.copied || info.deleted)
query_cache_invalidate3(thd, table_list, 1);
if (thd->lock)
{
mysql_unlock_tables(thd, thd->lock);
@ -310,8 +314,6 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
}
}
thd->proc_info="end";
if (info.copied || info.deleted)
query_cache_invalidate3(thd, table_list, 1);
table->time_stamp=save_time_stamp; // Restore auto timestamp ptr
table->next_number_field=0;
thd->count_cuted_fields=0;