diff options
author | Alfranio Correia <alfranio.correia@sun.com> | 2010-04-26 10:02:29 +0100 |
---|---|---|
committer | Alfranio Correia <alfranio.correia@sun.com> | 2010-04-26 10:02:29 +0100 |
commit | 68598c479bec557e22621678596fde95e0e5ee13 (patch) | |
tree | 7be6c5ebc708fc83a35cbbb9dd7f99f19c59149b /sql/log_event.cc | |
parent | 17aa4173a4a4dd71a64ab1f1eb9d9dd1b2405fc4 (diff) | |
download | mariadb-git-68598c479bec557e22621678596fde95e0e5ee13.tar.gz |
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.
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index 3a52b72909a..7e01d956615 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -679,7 +679,7 @@ Log_event::Log_event(THD* thd_arg, uint16 flags_arg, bool using_trans) server_id= thd->server_id; when= thd->start_time; cache_type= (using_trans || stmt_has_updated_trans_table(thd) - || thd->thread_specific_used + || thd->thread_temporary_used ? Log_event::EVENT_TRANSACTIONAL_CACHE : Log_event::EVENT_STMT_CACHE); } @@ -2553,7 +2553,7 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg, else { cache_type= ((using_trans || stmt_has_updated_trans_table(thd) || - force_trans || thd->thread_specific_used) + force_trans || thd->thread_temporary_used) ? Log_event::EVENT_TRANSACTIONAL_CACHE : Log_event::EVENT_STMT_CACHE); } |