diff options
author | serg@serg.mylan <> | 2004-11-22 21:33:15 +0100 |
---|---|---|
committer | serg@serg.mylan <> | 2004-11-22 21:33:15 +0100 |
commit | ee933cd1986fcbe14eb37cf732e92fe3692a7461 (patch) | |
tree | 9fd3b9eb87ff64ffe7e7374609beb327e419a87d /mysql-test/r/subselect.result | |
parent | 55575bea2ed86b3f16297c6a0aa8540133aea963 (diff) | |
parent | 2ca5a0f2b17b02c13711d5f45ff75c52a23e4fb3 (diff) | |
download | mariadb-git-ee933cd1986fcbe14eb37cf732e92fe3692a7461.tar.gz |
merged
Diffstat (limited to 'mysql-test/r/subselect.result')
-rw-r--r-- | mysql-test/r/subselect.result | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index ceb8919b26a..20ab3ac8f80 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -1998,3 +1998,18 @@ ac 700 NULL drop tables t1,t2; +create table t1 (a int not null, b int not null, c int, primary key (a,b)); +insert into t1 values (1,1,1), (2,2,2), (3,3,3); +set @b:= 0; +explain select sum(a) from t1 where b > @b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL PRIMARY 8 NULL 3 Using where; Using index +set @a:= (select sum(a) from t1 where b > @b); +explain select a from t1 where c=2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where +do @a:= (select sum(a) from t1 where b > @b); +explain select a from t1 where c=2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where +drop table t1; |