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

invalidation moved before tables unlocking

This commit is contained in:
bell@sanja.is.com.ua
2002-04-29 00:33:52 +03:00
parent eaa66555c9
commit 29201cbf66
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;