diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2016-02-09 13:50:48 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2016-02-09 18:58:54 +0100 |
commit | 6b614c620ec32cd8d96be880bbc8ff7c45bac7ce (patch) | |
tree | 3739c49329c22227bff5f3eb665ac357970d4359 /sql | |
parent | 775cccca9f1502ae2f4cf1417d0f94d4872d4630 (diff) | |
download | mariadb-git-6b614c620ec32cd8d96be880bbc8ff7c45bac7ce.tar.gz |
MDEV-7765: Crash (Assertion `!table || (!table->write_set || bitmap_is_set(table->write_set, field_index) || bitmap_is_set(table->vcol_set, field_index))' fails) on using function over not created table
Problem was that created table was not marked as used (not set query_id) and so opening tables for stored function pick it up (as opened place holder for it) and used changing TABLE internals.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_insert.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 52e059b5ef8..a089f5202aa 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -4151,6 +4151,8 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u) DBUG_RETURN(1); table->mark_columns_needed_for_insert(); table->file->extra(HA_EXTRA_WRITE_CACHE); + // Mark table as used + table->query_id= thd->query_id; DBUG_RETURN(0); } |