diff options
author | Georgi Kodinov <joro@sun.com> | 2009-12-15 14:20:29 +0200 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2009-12-15 14:20:29 +0200 |
commit | 188c6f8c7474a0c23282451c592df66048734c04 (patch) | |
tree | 1bc85539fb390643825d37fef23206e72f1bb554 /mysql-test/t/subselect.test | |
parent | dd5550d39616ba797d2c0e72e1c747f09b8cb446 (diff) | |
download | mariadb-git-188c6f8c7474a0c23282451c592df66048734c04.tar.gz |
Bug #48709: Assertion failed in sql_select.cc:11782:
int join_read_key(JOIN_TAB*)
The eq_ref access method TABLE_REF (accessed through
JOIN_TAB) to save state and to track if this is the
first row it finds or not.
This state was not reset on subquery re-execution
causing an assert.
Fixed by resetting the state before the subquery
re-execution.
Diffstat (limited to 'mysql-test/t/subselect.test')
-rw-r--r-- | mysql-test/t/subselect.test | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 7f2dba00ba8..a4314c45cba 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -3368,6 +3368,32 @@ WHERE a = 230; DROP TABLE t1, st1, st2; +--echo # +--echo # Bug #48709: Assertion failed in sql_select.cc:11782: +--echo # int join_read_key(JOIN_TAB*) +--echo # + +CREATE TABLE t1 (pk int PRIMARY KEY, int_key int); +INSERT INTO t1 VALUES (10,1), (14,1); + +CREATE TABLE t2 (pk int PRIMARY KEY, int_key int); +INSERT INTO t2 VALUES (3,3), (5,NULL), (7,3); + +--echo # should have eq_ref for t1 +--replace_column 1 x 2 x 5 x 6 x 7 x 8 x 9 x 10 x +EXPLAIN +SELECT * FROM t2 outr +WHERE outr.int_key NOT IN (SELECT t1.pk FROM t1, t2) +ORDER BY outr.pk; + +--echo # should not crash on debug binaries +SELECT * FROM t2 outr +WHERE outr.int_key NOT IN (SELECT t1.pk FROM t1, t2) +ORDER BY outr.pk; + +DROP TABLE t1,t2; + + --echo End of 5.0 tests. # |