Commit 62102786 authored by unknown's avatar unknown

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).


mysql-test/r/multi_update.result:
  results changed - there is no ROLLBACK in binlog anymore as it should be
sql/sql_update.cc:
  A wrong assumption on that there were modified transactional table,
  which is nonsense at the very beginning of the query execution.
parent 7faa7d60
......@@ -545,7 +545,7 @@ a b
4 4
show master status /* there must be the UPDATE query event */;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 328
master-bin.000001 189
delete from t1;
delete from t2;
insert into t1 values (1,2),(3,4),(4,4);
......@@ -555,7 +555,7 @@ UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a;
ERROR 23000: Duplicate entry '4' for key 1
show master status /* there must be the UPDATE query event */;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 343
master-bin.000001 204
drop table t1, t2;
drop table if exists t1, t2, t3;
CREATE TABLE t1 (a int, PRIMARY KEY (a));
......
......@@ -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)
{}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment