diff options
author | unknown <igor@rurik.mysql.com> | 2005-06-23 02:08:30 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2005-06-23 02:08:30 -0700 |
commit | c4a8325da2583f783cd81d231a309b2080e34954 (patch) | |
tree | 4c0397dcf9881c6b25379b577031eecde78135ff /mysql-test/r/subselect.result | |
parent | e5245b34d1ad08734114eea5fe9e03838c4c167b (diff) | |
download | mariadb-git-c4a8325da2583f783cd81d231a309b2080e34954.tar.gz |
opt_range.cc:
Fixed buf #11487.
Added a call of QUICK_RANGE_SELECT::init to the
QUICK_RANGE_SELECT::reset method. Without it the second
evaluation of a subquery employing the range access failed.
subselect.result, subselect.test:
Added a test case for bug #11487.
mysql-test/t/subselect.test:
Added a test case for bug #11487.
mysql-test/r/subselect.result:
Added a test case for bug #11487.
sql/opt_range.cc:
Fixed buf #11487.
Added a call of QUICK_RANGE_SELECT::init to the
QUICK_RANGE_SELECT::reset method. Without it the second
evaluation of a subquery employing the range access failed.
Diffstat (limited to 'mysql-test/r/subselect.result')
-rw-r--r-- | mysql-test/r/subselect.result | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 6703147c635..736559f8569 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -2816,3 +2816,24 @@ select * from t1; EMPNUM E1 DROP TABLE t1,t2; +CREATE TABLE t1(select_id BIGINT, values_id BIGINT); +INSERT INTO t1 VALUES (1, 1); +CREATE TABLE t2 (select_id BIGINT, values_id BIGINT, +PRIMARY KEY(select_id,values_id)); +INSERT INTO t2 VALUES (0, 1), (0, 2), (0, 3), (1, 5); +SELECT values_id FROM t1 +WHERE values_id IN (SELECT values_id FROM t2 +WHERE select_id IN (1, 0)); +values_id +1 +SELECT values_id FROM t1 +WHERE values_id IN (SELECT values_id FROM t2 +WHERE select_id BETWEEN 0 AND 1); +values_id +1 +SELECT values_id FROM t1 +WHERE values_id IN (SELECT values_id FROM t2 +WHERE select_id = 0 OR select_id = 1); +values_id +1 +DROP TABLE t1, t2; |