diff options
author | Marko Mäkelä <marko.makela@oracle.com> | 2010-04-26 13:27:25 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@oracle.com> | 2010-04-26 13:27:25 +0300 |
commit | 063928ba05b34b4bf46d1951fbfa88b8b46039d0 (patch) | |
tree | da56877e4f88ad7c2255739437a74d3ff5d9efc4 /mysql-test/suite/innodb | |
parent | 410afeaa0b4e238f2c3ceafabd14119ef3d583d2 (diff) | |
download | mariadb-git-063928ba05b34b4bf46d1951fbfa88b8b46039d0.tar.gz |
row_search_for_mysql(): Never try semi-consistent read in unique searches.
They are only useful in table scans. (Bug #52663)
Diffstat (limited to 'mysql-test/suite/innodb')
-rw-r--r-- | mysql-test/suite/innodb/r/innodb_bug52663.result | 26 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/innodb_bug52663-master.opt | 1 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/innodb_bug52663.test | 34 |
3 files changed, 61 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/r/innodb_bug52663.result b/mysql-test/suite/innodb/r/innodb_bug52663.result new file mode 100644 index 00000000000..89add18617b --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb_bug52663.result @@ -0,0 +1,26 @@ +set session transaction isolation level read committed; +create table innodb_bug52663 (what varchar(5), id integer, count integer, primary key +(what, id)) engine=innodb; +insert into innodb_bug52663 values ('total', 0, 0); +begin; +set session transaction isolation level read committed; +begin; +update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0; +select * from innodb_bug52663; +what id count +total 0 1 +update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +select * from innodb_bug52663; +what id count +total 0 0 +commit; +update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0; +commit; +select * from innodb_bug52663; +what id count +total 0 2 +select * from innodb_bug52663; +what id count +total 0 2 +drop table innodb_bug52663; diff --git a/mysql-test/suite/innodb/t/innodb_bug52663-master.opt b/mysql-test/suite/innodb/t/innodb_bug52663-master.opt new file mode 100644 index 00000000000..462f8fbe828 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb_bug52663-master.opt @@ -0,0 +1 @@ +--innodb_lock_wait_timeout=1 diff --git a/mysql-test/suite/innodb/t/innodb_bug52663.test b/mysql-test/suite/innodb/t/innodb_bug52663.test new file mode 100644 index 00000000000..fcf97531e00 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb_bug52663.test @@ -0,0 +1,34 @@ +--source include/have_innodb.inc + +set session transaction isolation level read committed; + +create table innodb_bug52663 (what varchar(5), id integer, count integer, primary key +(what, id)) engine=innodb; +insert into innodb_bug52663 values ('total', 0, 0); +begin; + +connect (addconroot, localhost, root,,); +connection addconroot; +set session transaction isolation level read committed; +begin; + +connection default; +update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0; +select * from innodb_bug52663; + +connection addconroot; +--error ER_LOCK_WAIT_TIMEOUT +update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0; +select * from innodb_bug52663; + +connection default; +commit; + +connection addconroot; +update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0; +commit; +select * from innodb_bug52663; + +connection default; +select * from innodb_bug52663; +drop table innodb_bug52663; |