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 /mysql-test/t/create.test | |
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 'mysql-test/t/create.test')
-rw-r--r-- | mysql-test/t/create.test | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index e066dc6277d..5c90c3e17a4 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -2061,3 +2061,24 @@ set @@session.collation_server=filename; create table t1(a enum('','')); drop table t1; set @@session.collation_server=default; + +--echo # +--echo # MDEV-7765: Crash (Assertion `!table || (!table->write_set || +--echo # bitmap_is_set(table->write_set, field_index) || +--echo # bitmap_is_set(table->vcol_set, field_index))' fails) +--echo # on using function over not created table +--echo # + +DELIMITER |; +CREATE function f1() returns int +BEGIN + declare n int; + set n:= (select count(*) from t1); + return n; +end| +DELIMITER ;| +-- error ER_NO_SUCH_TABLE +create table t1 as select f1(); +drop function f1; + +--echo End of 5.5 tests |