summaryrefslogtreecommitdiff
path: root/mysql-test/main/view.test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-09-30 09:04:43 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-09-30 09:04:43 +0300
commit064cb58efea063595e336e4cd0feccb12d26f8cf (patch)
treef140b96c8a20172cbb484375e38a7aa481ab660b /mysql-test/main/view.test
parente5a9dcfda20e174525ad63a30e12f592aa9c96d3 (diff)
parent57fdd016ce6167c15ba9cd41048b8a42ba582447 (diff)
downloadmariadb-git-064cb58efea063595e336e4cd0feccb12d26f8cf.tar.gz
Merge 10.4 into 10.5
FIXME: Part of the MDEV-20699 test is disabled due to nonderterministic result.
Diffstat (limited to 'mysql-test/main/view.test')
-rw-r--r--mysql-test/main/view.test49
1 files changed, 49 insertions, 0 deletions
diff --git a/mysql-test/main/view.test b/mysql-test/main/view.test
index 3325d4e6dd5..4345abf1bd8 100644
--- a/mysql-test/main/view.test
+++ b/mysql-test/main/view.test
@@ -6501,6 +6501,55 @@ DROP TABLE t1;
DROP VIEW v1;
--echo #
+--echo # MDEV-24454: Crash at change_item_tree
+--echo #
+
+CREATE TABLE t1(f0 INT);
+
+CREATE VIEW v1 AS
+SELECT
+ f0 AS f1
+FROM t1;
+
+CREATE VIEW v2 AS
+SELECT
+ (SELECT GROUP_CONCAT(v1.f1 SEPARATOR ', ')
+ FROM v1 n) AS f2,
+ GROUP_CONCAT('' SEPARATOR ', ') AS f3
+FROM v1;
+
+CREATE VIEW v3 AS
+SELECT 1 as f4 FROM v2;
+
+CREATE PROCEDURE p1()
+ SELECT * FROM v3;
+
+CALL p1();
+CALL p1();
+
+drop procedure p1;
+drop view v1,v2,v3;
+drop table t1;
+
+--echo #
+--echo # MDEV-25631: Crash in st_select_lex::mark_as_dependent with
+--echo # VIEW, aggregate and subquery
+--echo #
+
+CREATE TABLE t1 (i1 int);
+insert into t1 values (1),(2),(3); #not important
+CREATE VIEW v1 AS
+ SELECT t1.i1 FROM (t1 a JOIN t1 ON (t1.i1 = (SELECT t1.i1 FROM t1 b)));
+
+--error ER_SUBQUERY_NO_1_ROW
+SELECT 1 FROM (SELECT count(((SELECT i1 FROM v1))) FROM v1) dt ;
+delete from t1 where i1 > 1;
+SELECT 1 FROM (SELECT count(((SELECT i1 FROM v1))) FROM v1) dt ;
+
+drop view v1;
+drop table t1;
+
+--echo #
--echo # End of 10.2 tests
--echo #