diff --git a/handler/ha_innodb.cc b/handler/ha_innodb.cc index 5cc82954e7e..fc6593f4185 100644 --- a/handler/ha_innodb.cc +++ b/handler/ha_innodb.cc @@ -8341,10 +8341,11 @@ static MYSQL_SYSVAR_STR(data_file_path, innobase_data_file_path, static MYSQL_SYSVAR_LONG(autoinc_lock_mode, innobase_autoinc_lock_mode, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, - "The AUTOINC lock modes supported by InnoDB:\n" - " 0 => Old style AUTOINC locking (for backward compatibility)\n" - " 1 => New style AUTOINC locking\n" - " 2 => No AUTOINC locking (unsafe for SBR)", + "The AUTOINC lock modes supported by InnoDB: " + "0 => Old style AUTOINC locking (for backward" + " compatibility) " + "1 => New style AUTOINC locking " + "2 => No AUTOINC locking (unsafe for SBR)", NULL, NULL, AUTOINC_NEW_STYLE_LOCKING, /* Default setting */ AUTOINC_OLD_STYLE_LOCKING, /* Minimum value */ diff --git a/mysql-test/innodb-semi-consistent.result b/mysql-test/innodb-semi-consistent.result index ad7b70d0497..f1139390f20 100644 --- a/mysql-test/innodb-semi-consistent.result +++ b/mysql-test/innodb-semi-consistent.result @@ -1,3 +1,4 @@ +drop table if exists t1; set session transaction isolation level read committed; create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1; insert into t1 values (1),(2),(3),(4),(5),(6),(7); diff --git a/mysql-test/innodb-semi-consistent.test b/mysql-test/innodb-semi-consistent.test index 7a9231b508f..c33126b93ff 100644 --- a/mysql-test/innodb-semi-consistent.test +++ b/mysql-test/innodb-semi-consistent.test @@ -1,6 +1,10 @@ -- source include/not_embedded.inc -- source include/have_innodb.inc +--disable_warnings +drop table if exists t1; +--enable_warnings + # basic tests of semi-consistent reads connect (a,localhost,root,,); diff --git a/mysql-test/innodb.result b/mysql-test/innodb.result index 279e4ee2330..ef7b2cfc37d 100644 --- a/mysql-test/innodb.result +++ b/mysql-test/innodb.result @@ -1062,6 +1062,19 @@ select count(*) from t2 /* must be 2 as restored after rollback caused by the er count(*) 2 drop table t1, t2; +drop table if exists t1, t2; +CREATE TABLE t1 (a int, PRIMARY KEY (a)); +CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB; +create trigger trg_del_t2 after delete on t2 for each row +insert into t1 values (1); +insert into t1 values (1); +insert into t2 values (1),(2); +delete t2 from t2; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +select count(*) from t2 /* must be 2 as restored after rollback caused by the error */; +count(*) +2 +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 @@ -1727,10 +1740,10 @@ Variable_name Value Innodb_page_size 16384 show status like "Innodb_rows_deleted"; Variable_name Value -Innodb_rows_deleted 70 +Innodb_rows_deleted 71 show status like "Innodb_rows_inserted"; Variable_name Value -Innodb_rows_inserted 1082 +Innodb_rows_inserted 1084 show status like "Innodb_rows_updated"; Variable_name Value Innodb_rows_updated 885 diff --git a/mysql-test/innodb.test b/mysql-test/innodb.test index 196d924bf8f..6c6345389ad 100644 --- a/mysql-test/innodb.test +++ b/mysql-test/innodb.test @@ -752,6 +752,38 @@ select count(*) from t2 /* must be 2 as restored after rollback caused by the er drop table t1, t2; +# +# Bug #29136 erred multi-delete on trans table does not rollback +# + +# prepare +--disable_warnings +drop table if exists t1, t2; +--enable_warnings +CREATE TABLE t1 (a int, PRIMARY KEY (a)); +CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB; +create trigger trg_del_t2 after delete on t2 for each row + insert into t1 values (1); +insert into t1 values (1); +insert into t2 values (1),(2); + + +# exec cases A, B - see multi_update.test + +# A. send_error() w/o send_eof() branch + +--error ER_DUP_ENTRY +delete t2 from t2; + +# check + +select count(*) from t2 /* must be 2 as restored after rollback caused by the error */; + +# cleanup bug#29136 + +drop table t1, t2; + + # # Testing of IFNULL #