diff options
Diffstat (limited to 'mysql-test/main/view.test')
-rw-r--r-- | mysql-test/main/view.test | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/mysql-test/main/view.test b/mysql-test/main/view.test index 49b339c9f4c..71c8eff0539 100644 --- a/mysql-test/main/view.test +++ b/mysql-test/main/view.test @@ -1334,6 +1334,8 @@ execute stmt1 using @a; set @a= 301; execute stmt1 using @a; deallocate prepare stmt1; +insert into v3(a) select sum(302); +insert into v3(a) select sum(303) over (); --sorted_result select * from v3; @@ -6626,9 +6628,25 @@ CREATE TABLE t4 AS SELECT * FROM t1 JOIN t2 ON t1.x > t2.b; DROP TABLE t1,t2,t3; --echo # ---echo # End of 10.4 tests +--echo # MDEV-29088: view specification contains unknown column in ON condition --echo # +create table t1 (a int); +create table t2 (b int); +create table t3 (c int); + +--error ER_BAD_FIELD_ERROR +create view v as + select * from t1 left join t2 on t1.a=t2.b and t1.a in (select d from t3); + +--error ER_BAD_FIELD_ERROR +create algorithm=merge view v as + select * from t1 left join t2 on t1.a=t2.b and t1.a in (select d from t3); + +drop table t1,t2,t3; + +--echo # End of 10.4 tests + --echo # --echo # MDEV-13115: SELECT .. SKIP LOCKED - ensure SHOW CREATE VIEW is correct --echo # @@ -6654,5 +6672,23 @@ Drop View v4; Drop table t1; --echo # +--echo # MDEV-26456: SIGSEGV in flush_tables_with_read_lock on FLUSH TABLE +--echo # + +CREATE FUNCTION f() RETURNS INT RETURN (SELECT 1 FROM t); +CREATE VIEW v AS SELECT f(); +--error ER_VIEW_INVALID +SELECT * FROM v; +FLUSH TABLE v WITH READ LOCK; +UNLOCK TABLES; +FLUSH TABLES v FOR EXPORT; +UNLOCK TABLES; +--error ER_VIEW_INVALID +SELECT * FROM v; + +DROP VIEW v; +DROP FUNCTION f; + +--echo # --echo # End of 10.6 tests --echo # |