diff options
author | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-08-13 14:20:49 +0300 |
---|---|---|
committer | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-08-13 14:20:49 +0300 |
commit | 53e0b31e9c97754f9bd147049c70e55b77be8fc5 (patch) | |
tree | 43314cb25a204c52085ce1dbc39ae8e94aa6bc68 /mysql-test/t/user_var.test | |
parent | bc05a9471d97d966900cbfdea9032a9fde3915b2 (diff) | |
download | mariadb-git-53e0b31e9c97754f9bd147049c70e55b77be8fc5.tar.gz |
merge
Diffstat (limited to 'mysql-test/t/user_var.test')
-rw-r--r-- | mysql-test/t/user_var.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test index fc4bc61f526..06508c43766 100644 --- a/mysql-test/t/user_var.test +++ b/mysql-test/t/user_var.test @@ -326,6 +326,24 @@ INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1); DROP TABLE t1; +# +# Bug #55615: debug assertion after using variable in assignment and +# referred to +# Bug #55564: crash with user variables, assignments, joins... +# + +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES (0),(0); +--echo # BUG#55615 : should not crash +SELECT (@a:=(SELECT @a:=1 FROM t1 LIMIT 1)) AND COUNT(1) FROM t1 GROUP BY @a; +--echo # 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; + +DROP TABLE t1; + --echo End of 5.1 tests # |