summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-09-26 16:43:54 +0200
committerSergei Golubchik <serg@mariadb.org>2017-09-27 10:22:15 +0200
commitf0e9bebd278b27e05d9c66746420b48535f2b86e (patch)
treea9d5c71f55945bf02fd92bba11897022c6f3178a /mysql-test/r
parent5b01b88e2ba6a51a5e9112badb45210e3b2e3dc4 (diff)
downloadmariadb-git-f0e9bebd278b27e05d9c66746420b48535f2b86e.tar.gz
MDEV-13897 SELECT @a := MAX(col) FROM t requires full index scanmariadb-10.1.28
fix some old bad merge
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/join_cache.result2
-rw-r--r--mysql-test/r/user_var.result16
-rw-r--r--mysql-test/r/variables.result4
3 files changed, 12 insertions, 10 deletions
diff --git a/mysql-test/r/join_cache.result b/mysql-test/r/join_cache.result
index a5a24455d9b..7a11cb95715 100644
--- a/mysql-test/r/join_cache.result
+++ b/mysql-test/r/join_cache.result
@@ -5880,7 +5880,7 @@ where c1 = c2-0 and c2 <= (select max(c3) from t3 where c3 = 2 and @counter:=@co
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 2
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
-2 UNCACHEABLE SUBQUERY t3 system NULL NULL NULL NULL 1
+2 UNCACHEABLE SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
set @counter=0;
select count(*) from t1 straight_join t2
where c1 = c2-0 and c2 <= (select max(c3) from t3 where c3 = 2 and @counter:=@counter+1);
diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result
index 178f9fb7db4..ec19f922b05 100644
--- a/mysql-test/r/user_var.result
+++ b/mysql-test/r/user_var.result
@@ -1,4 +1,3 @@
-drop table if exists t1,t2;
set @a := foo;
ERROR 42S22: Unknown column 'foo' in 'field list'
set @a := connection_id() + 3;
@@ -126,14 +125,14 @@ select @a+0, @a:=@a+0+count(*), count(*), @a+0 from t1 group by i;
set @a=0;
select @a,@a:="hello",@a,@a:=3,@a,@a:="hello again" from t1 group by i;
@a @a:="hello" @a @a:=3 @a @a:="hello again"
-0 hello 0 3 3 hello again
-0 hello 0 3 3 hello again
-0 hello 0 3 3 hello again
+0 hello 0 3 0 hello again
+0 hello 0 3 0 hello again
+0 hello 0 3 0 hello again
select @a,@a:="hello",@a,@a:=3,@a,@a:="hello again" from t1 group by i;
@a @a:="hello" @a @a:=3 @a @a:="hello again"
-hello again hello hello 3 3 hello again
-hello again hello hello 3 3 hello again
-hello again hello hello 3 3 hello again
+hello again hello hello again 3 hello again hello again
+hello again hello hello again 3 hello again hello again
+hello again hello hello again 3 hello again hello again
drop table t1;
set @a=_latin2'test';
select charset(@a),collation(@a),coercibility(@a);
@@ -570,3 +569,6 @@ End of 5.5 tests
#
set @var= repeat('a',20000);
1
+explain select @a:=max(seq) from seq_1_to_1000000;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result
index fef3e4a3e9e..b621fc13ee4 100644
--- a/mysql-test/r/variables.result
+++ b/mysql-test/r/variables.result
@@ -1544,7 +1544,7 @@ one
1
explain SELECT 1 as 'one' FROM t1 GROUP BY @a:= (SELECT ROUND(f1) FROM t1 WHERE f1 = 0);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2
2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where
SELECT 1 as 'one' FROM t1 GROUP BY @a:= (SELECT ROUND(f1) FROM t1 WHERE f1 = 0);
one
@@ -1555,7 +1555,7 @@ one
set sql_buffer_result=1;
explain SELECT 1 as 'one' FROM t1 GROUP BY @a:= (SELECT ROUND(f1) FROM t1 WHERE f1 = 0);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using temporary
2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where
SELECT 1 as 'one' FROM t1 GROUP BY @a:= (SELECT ROUND(f1) FROM t1 WHERE f1 = 0);
one