From 7880fade24dec704a5df54d0278f4aae905fc7a5 Mon Sep 17 00:00:00 2001 From: "aelkin/elkin@koti.dsl.inet.fi" <> Date: Mon, 4 Feb 2008 16:37:41 +0200 Subject: Bug#33329 extraneous ROLLBACK in binlog on connection does not use trans tables There had been two issues. Rollback statement was recorded in binlog even though a multi-update had not modified any non-transactional table. The reason for this artifact was a false initial value of multi_update::transactional_tables. Yet another artifact that explained on the bug page is that `ha_autocommit_or_rollback' works differently depending on whether a transaction engine has been compiled in. Fixed: with setting multi_update::transactional_tables to zero at initialization time. Multi-update on non-trans table won't cause ROLLBACK in binlog with either compilation option. The 2nd mentioned artifact comprises a self-standing issue (to be reported separately). --- sql/sql_update.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_update.cc') diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 84349a40977..e5017058659 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -979,7 +979,7 @@ multi_update::multi_update(TABLE_LIST *table_list, tmp_tables(0), updated(0), found(0), fields(field_list), values(value_list), table_count(0), copy_field(0), handle_duplicates(handle_duplicates_arg), do_update(1), trans_safe(1), - transactional_tables(1), ignore(ignore_arg), error_handled(0) + transactional_tables(0), ignore(ignore_arg), error_handled(0) {} -- cgit v1.2.1 From 871eb3e5adc5f61918d74c307e145d9bf1ee3791 Mon Sep 17 00:00:00 2001 From: "aelkin/andrei@mysql1000.dsl.inet.fi" <> Date: Thu, 14 Feb 2008 16:28:32 +0200 Subject: bug#33329 extraneous ROLLBACK in binlog on connection does not use trans tables changes for an assert and an updated results file. --- sql/sql_update.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_update.cc') diff --git a/sql/sql_update.cc b/sql/sql_update.cc index e5017058659..9c82bde9497 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -1482,7 +1482,7 @@ void multi_update::send_error(uint errcode,const char *err) if (trans_safe) { - DBUG_ASSERT(transactional_tables); + DBUG_ASSERT(!updated || transactional_tables); (void) ha_autocommit_or_rollback(thd, 1); } else -- cgit v1.2.1