diff options
author | unknown <aelkin/elkin@dsl-hkibras1-ff5dc300-70.dhcp.inet.fi> | 2007-06-01 11:14:04 +0300 |
---|---|---|
committer | unknown <aelkin/elkin@dsl-hkibras1-ff5dc300-70.dhcp.inet.fi> | 2007-06-01 11:14:04 +0300 |
commit | 6b94fc579fdf3ddf4905a5b2c3c9e76d445f1304 (patch) | |
tree | e734e33ae28cf73ae86a6a49e056ab272eec54f6 /mysql-test/r/innodb.result | |
parent | 199dab236da0713d575b421ddd632232905a1022 (diff) | |
download | mariadb-git-6b94fc579fdf3ddf4905a5b2c3c9e76d445f1304.tar.gz |
Bug #27716 multi-update did partially and has not binlogged
Implementation of mysql_multi_update did not call multi_update::send_error method in some cases
(see the test reported on bug page and test cases in changeset).
Fixed with deploying the method, ::send_error() is refined to get binlogging code which works whenever
there is modified non-transactional table.
thd->no_trans_update.stmt flag is set in to TRUE to ease testing though being the beginning of relative
bug#27417 fix (addresses a part of those issues).
Eliminating two minor issues (small bugs) in multi_update methods.
This patch for multi-update also addresses a part of the issues reported in bug#13270,bug#23333.
mysql-test/r/innodb.result:
result changed
mysql-test/r/multi_update.result:
results changed
mysql-test/t/innodb.test:
regression test for the bug combining transactional and non-transaction tables
mysql-test/t/multi_update.test:
regression tests added - erred query must be binlogged
sql/sql_update.cc:
making a call to multi_update::send_error when mysql_select return an error;
deploying binlogging inside of ::send_error;
refining multi_update::send_eof() to mark binlogging work done when its call to ::do_updates() errs
and the query is binlogged with the error. ::send_error() will be called after all but
do not do anything;
thd->no_trans_update.stmt is corrected to be set to TRUE according to the existed code pattern.
Although this part relates to another bugs (bug#27417 etc) it is needed here for testing;
Eliminating a separate issue in multi_update::do_updates where
either one of the class members trans_safe, transactional_tables was
set after the per-table loop whereas both should be calculated during
looping.
Eliminating a separate issue in ::send_eof() where thd->no_trans_update.all won't be set TRUE when
amoung others there'd be at least one modified transactional table.
Binlogging is done to satisfy to general character bug#13270,bug#23333 so that those won't have
fixes specific for multi-update.
Diffstat (limited to 'mysql-test/r/innodb.result')
-rw-r--r-- | mysql-test/r/innodb.result | 45 |
1 files changed, 39 insertions, 6 deletions
diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 0638152ba42..272f5dbb58e 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1086,6 +1086,39 @@ n d 1 30 2 20 drop table t1,t2; +CREATE TABLE `t1` ( +`a` int(11) NOT NULL auto_increment, +`b` int(11) default NULL, +PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 ; +CREATE TABLE `t2` ( +`a` int(11) NOT NULL auto_increment, +`b` int(11) default NULL, +PRIMARY KEY (`a`) +) ENGINE=INNODB DEFAULT CHARSET=latin1 ; +insert into t1 values (1,1),(2,2); +insert into t2 values (1,1),(4,4); +reset master; +UPDATE t2,t1 SET t2.a=t1.a+2; +ERROR 23000: Duplicate entry '3' for key 1 +select * from t2 /* must be (3,1), (4,4) */; +a b +1 1 +4 4 +show master status /* there must no UPDATE in binlog */; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 98 +delete from t1; +delete from t2; +insert into t1 values (1,2),(3,4),(4,4); +insert into t2 values (1,2),(3,4),(4,4); +reset master; +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 no UPDATE query event */; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 98 +drop table t1, t2; create table t1 (a int, b int) engine=innodb; insert into t1 values(20,null); select t2.b, ifnull(t2.b,"this is null") from t1 as t2 left join t1 as t3 on @@ -1642,14 +1675,14 @@ t2 CREATE TABLE `t2` ( drop table t2, t1; show status like "binlog_cache_use"; Variable_name Value -Binlog_cache_use 155 +Binlog_cache_use 158 show status like "binlog_cache_disk_use"; Variable_name Value Binlog_cache_disk_use 0 create table t1 (a int) engine=innodb; show status like "binlog_cache_use"; Variable_name Value -Binlog_cache_use 156 +Binlog_cache_use 159 show status like "binlog_cache_disk_use"; Variable_name Value Binlog_cache_disk_use 1 @@ -1658,7 +1691,7 @@ delete from t1; commit; show status like "binlog_cache_use"; Variable_name Value -Binlog_cache_use 157 +Binlog_cache_use 160 show status like "binlog_cache_disk_use"; Variable_name Value Binlog_cache_disk_use 1 @@ -1782,13 +1815,13 @@ Variable_name Value Innodb_page_size 16384 show status like "Innodb_rows_deleted"; Variable_name Value -Innodb_rows_deleted 2070 +Innodb_rows_deleted 2072 show status like "Innodb_rows_inserted"; Variable_name Value -Innodb_rows_inserted 31727 +Innodb_rows_inserted 31732 show status like "Innodb_rows_updated"; Variable_name Value -Innodb_rows_updated 29530 +Innodb_rows_updated 29532 show status like "Innodb_row_lock_waits"; Variable_name Value Innodb_row_lock_waits 0 |