diff options
author | Igor Babaev <igor@askmonty.org> | 2018-04-26 16:38:56 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2018-04-26 16:38:56 -0700 |
commit | 6c5e60f1b198ff846ee5595927ff5a74c6b08e91 (patch) | |
tree | 4a6793b072f82dc5e5a00e06c723a0a0be5d807d /sql/sql_tvc.cc | |
parent | 99fa7c6c2f9c8d705481bec35f7c4af48848cf70 (diff) | |
download | mariadb-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 'sql/sql_tvc.cc')
-rw-r--r-- | sql/sql_tvc.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_tvc.cc b/sql/sql_tvc.cc index 7004c32e602..295aaded147 100644 --- a/sql/sql_tvc.cc +++ b/sql/sql_tvc.cc @@ -221,6 +221,12 @@ bool table_value_constr::prepare(THD *thd, SELECT_LEX *sl, uint cnt= first_elem->elements; Type_holder *holders; + if (cnt == 0) + { + my_error(ER_EMPTY_ROW_IN_TVC, MYF(0)); + DBUG_RETURN(true); + } + if (fix_fields_for_tvc(thd, li)) DBUG_RETURN(true); |