1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

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.
This commit is contained in:
Oleksandr Byelkin
2016-02-09 13:50:48 +01:00
parent 775cccca9f
commit 6b614c620e
3 changed files with 39 additions and 0 deletions

View File

@ -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);
}