summaryrefslogtreecommitdiff
path: root/mysql-test/main/table_value_constr.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/table_value_constr.result')
-rw-r--r--mysql-test/main/table_value_constr.result26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/main/table_value_constr.result b/mysql-test/main/table_value_constr.result
index 39caba331ef..9e0a0968932 100644
--- a/mysql-test/main/table_value_constr.result
+++ b/mysql-test/main/table_value_constr.result
@@ -2071,3 +2071,29 @@ ERROR HY000: Field reference 'b' can't be used in table value constructor
select * from (values (1), (t1.b), (2)) as new_tvc;
ERROR HY000: Field reference 't1.b' can't be used in table value constructor
drop table t1;
+#
+# MDEV-15940: cursor over TVC
+#
+BEGIN NOT ATOMIC
+DECLARE v INT;
+DECLARE cur CURSOR FOR VALUES(7);
+OPEN cur;
+FETCH cur INTO v;
+SELECT v;
+END;
+|
+v
+7
+BEGIN NOT ATOMIC
+DECLARE v INT DEFAULT 0;
+FOR a IN (VALUES (7)) DO SET v = v + 1; END FOR;
+SELECT v;
+END;
+|
+v
+1
+#
+# MDEV-16038: empty row in TVC
+#
+with t as (values (),()) select 1 from t;
+ERROR HY000: Row with no elements is not allowed in table value constructor in this context