summaryrefslogtreecommitdiff
path: root/mysql-test/r/user_var.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/user_var.result')
-rw-r--r--mysql-test/r/user_var.result38
1 files changed, 36 insertions, 2 deletions
diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result
index 6cbbe934bde..78ed5bb65d5 100644
--- a/mysql-test/r/user_var.result
+++ b/mysql-test/r/user_var.result
@@ -461,8 +461,42 @@ GROUP BY @b:=(SELECT COUNT(*) > t2.a);
@a:=MIN(t1.a)
1
DROP TABLE t1;
+SET @bug12408412=1;
+SELECT GROUP_CONCAT(@bug12408412 ORDER BY 1) INTO @bug12408412;
End of 5.1 tests
-DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES (0);
+SELECT DISTINCT POW(COUNT(*), @a:=(SELECT 1 FROM t1 LEFT JOIN t1 AS t2 ON @a))
+AS b FROM t1 GROUP BY a;
+b
+1
+SELECT @a;
+@a
+1
+DROP TABLE t1;
+CREATE TABLE t1(f1 INT, f2 INT);
+INSERT INTO t1 VALUES (1,2),(2,3),(3,1);
+CREATE TABLE t2(a INT);
+INSERT INTO t2 VALUES (1);
+SET @var=NULL;
+SELECT @var:=(SELECT f2 FROM t2 WHERE @var) FROM t1 GROUP BY f1 ORDER BY f2 DESC
+LIMIT 1;
+@var:=(SELECT f2 FROM t2 WHERE @var)
+NULL
+SELECT @var;
+@var
+NULL
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES (0),(1),(3);
+SELECT DISTINCT POW(COUNT(distinct a), @a:=(SELECT 1 FROM t1 LEFT JOIN t1 AS t2 ON @a limit 1)) AS b FROM t1 GROUP BY a;
+b
+1
+SELECT @a;
+@a
+1
+DROP TABLE t1;
+End of 5.2 tests
CREATE TABLE t1(f1 INT AUTO_INCREMENT, PRIMARY KEY(f1));
INSERT INTO t1 SET f1 = NULL ;
SET @aux = NULL ;
@@ -530,9 +564,9 @@ SELECT @a;
@a
1
DROP TABLE t1;
+End of 5.5 tests
#
# Check that used memory extends if we set a variable
#
set @var= repeat('a',20000);
1
-End of 5.5 tests