summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2018-04-26 16:38:56 -0700
committerIgor Babaev <igor@askmonty.org>2018-04-26 16:38:56 -0700
commit6c5e60f1b198ff846ee5595927ff5a74c6b08e91 (patch)
tree4a6793b072f82dc5e5a00e06c723a0a0be5d807d /mysql-test
parent99fa7c6c2f9c8d705481bec35f7c4af48848cf70 (diff)
downloadmariadb-git-6c5e60f1b198ff846ee5595927ff5a74c6b08e91.tar.gz
MDEV-16038 Assertion `map->n_bits > 0' failed (my_bitmap.c:386: bitmap_is_clear_all)
Rows with no elements are not allowed in a table value constructor unless it is used in an INSERT statement.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/main/table_value_constr.result7
-rw-r--r--mysql-test/main/table_value_constr.test9
2 files changed, 14 insertions, 2 deletions
diff --git a/mysql-test/main/table_value_constr.result b/mysql-test/main/table_value_constr.result
index 5a904cbca4b..9e0a0968932 100644
--- a/mysql-test/main/table_value_constr.result
+++ b/mysql-test/main/table_value_constr.result
@@ -2072,7 +2072,7 @@ 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-MDEV-15940: cursor over TVC
+# MDEV-15940: cursor over TVC
#
BEGIN NOT ATOMIC
DECLARE v INT;
@@ -2092,3 +2092,8 @@ 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
diff --git a/mysql-test/main/table_value_constr.test b/mysql-test/main/table_value_constr.test
index 84f196b92a2..eb5ea59f829 100644
--- a/mysql-test/main/table_value_constr.test
+++ b/mysql-test/main/table_value_constr.test
@@ -1046,7 +1046,7 @@ select * from (values (1), (t1.b), (2)) as new_tvc;
drop table t1;
--echo #
---echo # MDEV-MDEV-15940: cursor over TVC
+--echo # MDEV-15940: cursor over TVC
--echo #
DELIMITER |;
@@ -1068,3 +1068,10 @@ END;
|
DELIMITER ;|
+
+--echo #
+--echo # MDEV-16038: empty row in TVC
+--echo #
+
+--error ER_EMPTY_ROW_IN_TVC
+with t as (values (),()) select 1 from t;