mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
ha_innodb.cc:
Remove accidenatlly committed debug printfs when query cache is used sql_update.cc, sql_load.cc, sql_insert.cc, sql_delete.cc: For the transactional query cache algorithm to work we must invalidate the query cache in INSERT/DELETE/UPDATE before writing to the binlog or calling ha_autocommit_... Note that binlog writing may also call commit. The crucial thing is that the transaction which modified data must not be committed BEFORE the query cache is invalidated.
This commit is contained in:
@ -283,6 +283,10 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
|
||||
table->copy_blobs=0;
|
||||
thd->count_cuted_fields=0; /* Don`t calc cuted fields */
|
||||
|
||||
/* We must invalidate the table in query cache before binlog writing and
|
||||
ha_autocommit_... */
|
||||
query_cache_invalidate3(thd, table_list, 0);
|
||||
|
||||
if (error)
|
||||
{
|
||||
if (transactional_table)
|
||||
@ -344,8 +348,6 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
|
||||
}
|
||||
if (transactional_table)
|
||||
error=ha_autocommit_or_rollback(thd,error);
|
||||
query_cache_invalidate3(thd, table_list, 0);
|
||||
|
||||
err:
|
||||
if (thd->lock)
|
||||
{
|
||||
|
Reference in New Issue
Block a user