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

BUG#53075 SBR: Strange warning around CONNECTION_ID

Statements with CONNECTION_ID were forced to be kept in the transactional
cache and by consequence non-transactional changes that were supposed to
be flushed ahead of the transaction were kept in the transactional cache.

This happened because after BUG#51894 any statement whose thd's
thread_specific_used was set was kept in the transactional cache. The idea
was to keep changes on temporary tables in the transactional cache. However,
the thread_specific_used was set not only for statements that accessed
temporary tables but also when the CONNECTION_ID was used.

To fix the problem, we created a new variable to keep track of updates
to temporary tables.


mysql-test/suite/rpl/r/rpl_temp_temporary.result:
  Added a test case.
mysql-test/suite/rpl/t/rpl_temp_temporary.test:
  Added a test case.
sql/log_event.cc:
  Uses the thread_temporary_used to decide if a statement should
  be kept in the transactional cache or not.
sql/sql_class.cc:
  Sets the thread_temporary_used while calling the decide_logging_format.
sql/sql_class.h:
  Defines the thread_temporary_used.
sql/sql_parse.cc:
  Resets the thread_temporary_used.
This commit is contained in:
Alfranio Correia
2010-04-26 10:02:29 +01:00
parent 17aa4173a4
commit 68598c479b
6 changed files with 80 additions and 3 deletions

View File

@@ -5530,7 +5530,7 @@ void THD::reset_for_next_command()
thd->transaction.all.modified_non_trans_table= FALSE;
}
DBUG_ASSERT(thd->security_ctx== &thd->main_security_ctx);
thd->thread_specific_used= FALSE;
thd->thread_specific_used= thd->thread_temporary_used= FALSE;
if (opt_bin_log)
{