mirror of
https://github.com/MariaDB/server.git
synced 2025-08-31 22:22:30 +03:00
Backport of bug #55564 to 5.0-security
This commit is contained in:
@@ -378,4 +378,21 @@ FROM t1,t2 WHERE t1.f1 = t2.f1 ORDER BY t2.f1;
|
||||
MIN(t2.f1) @bar:= (SELECT MIN(t3.f2) FROM t3 WHERE t3.f2 > foo)
|
||||
10 NULL
|
||||
DROP TABLE t1, t2, t3;
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES (0),(0);
|
||||
# BUG#55615 : should not crash
|
||||
SELECT (@a:=((SELECT @a:=1 FROM t1 LIMIT 1))) AND COUNT(1) FROM t1 GROUP BY @a;
|
||||
(@a:=((SELECT @a:=1 FROM t1 LIMIT 1))) AND COUNT(1)
|
||||
1
|
||||
1
|
||||
# BUG#55564 : should not crash
|
||||
SELECT IF(
|
||||
@v:=LEAST((SELECT 1 FROM t1 t2 LEFT JOIN t1 ON (@v) GROUP BY t1.a), a),
|
||||
count(*), 1)
|
||||
FROM t1 GROUP BY a LIMIT 1;
|
||||
IF(
|
||||
@v:=LEAST((SELECT 1 FROM t1 t2 LEFT JOIN t1 ON (@v) GROUP BY t1.a), a),
|
||||
count(*), 1)
|
||||
1
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
|
Reference in New Issue
Block a user