Below is the list of changes that have just been committed into a local
5.0 repository of elkin. When elkin does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-02-04 16:37:41+02:00, aelkin@stripped +2 -0
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@stripped, 2008-02-04 16:37:38+02:00, aelkin@stripped +2 -2
results changed - there is no ROLLBACK in binlog anymore as it should be
sql/sql_update.cc@stripped, 2008-02-04 16:37:38+02:00, aelkin@stripped +1 -1
A wrong assumption on that there were modified transactional table,
which is nonsense at the very beginning of the query execution.
diff -Nrup a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result
--- a/mysql-test/r/multi_update.result 2007-12-21 21:30:22 +02:00
+++ b/mysql-test/r/multi_update.result 2008-02-04 16:37:38 +02:00
@@ -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=t
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));
diff -Nrup a/sql/sql_update.cc b/sql/sql_update.cc
--- a/sql/sql_update.cc 2007-11-06 13:27:43 +02:00
+++ b/sql/sql_update.cc 2008-02-04 16:37:38 +02:00
@@ -979,7 +979,7 @@ multi_update::multi_update(TABLE_LIST *t
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)
{}