diff options
author | unknown <sergefp@mysql.com> | 2007-04-19 03:04:23 +0400 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2007-04-19 03:04:23 +0400 |
commit | 1b8ecd274e2a3f20b45c8b96831758757582f4fd (patch) | |
tree | 2b2aa2b9fc008b77ea52d7e165721541d4e67717 /mysql-test/t | |
parent | 3e8252ffc6ff28df8b0dbadcfea6ca506a731cbf (diff) | |
download | mariadb-git-1b8ecd274e2a3f20b45c8b96831758757582f4fd.tar.gz |
BUG#27939: Early NULLs filtering doesn't work for eq_ref access
- Turn it on for JT_EQ_REF access method
mysql-test/r/join.result:
BUG#27939: Testcase
mysql-test/t/join.test:
BUG#27939: Testcase
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/bdb_notembedded.test | 38 | ||||
-rw-r--r-- | mysql-test/t/join.test | 23 |
2 files changed, 61 insertions, 0 deletions
diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests diff --git a/mysql-test/t/join.test b/mysql-test/t/join.test index 99dd21e8ee2..a0fc7059179 100644 --- a/mysql-test/t/join.test +++ b/mysql-test/t/join.test @@ -610,4 +610,27 @@ DESCRIBE tv2; DROP VIEW v1; DROP TABLE t1,t2,tv1,tv2; + +# BUG#27939: Early NULLs filtering doesn't work for eq_ref access +create table t1 (a int, b int); +insert into t1 values + (NULL, 1), + (NULL, 2), + (NULL, 3), + (NULL, 4); + +create table t2 (a int not null, primary key(a)); +insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); + +create table t3 (a int not null, primary key(a)); +insert into t3 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); + +flush status; +select * from t1, t2, t3 where t3.a=t1.a and t2.a=t1.b; +explain select * from t1, t2, t3 where t3.a=t1.a and t2.a=t1.b; +--echo We expect rnd_next=5, and read_key must be 0 because of short-cutting: +show status like 'Handler_read%'; +drop table t1, t2, t3; + + --echo End of 5.0 tests. |