--disable_abort_on_error #################################################### # The basic script from the NIST tests is # --source t/nist/schema/schema8.mysql #################################################### ######### The extreme ugly variants of interest # # 1. The database name influences the crash # let $working_db= SUN; # --> crash # let $working_db= ABC; # --> crash let $working_db= mysqk; # --> crash # let $working_db= mysqltest; # --> no crash # let $working_db= mysqm; # --> no crash # It looks like it plays a role if the name of the new database comes # before or after the already existing standard database 'mysql' . # # 2. The number of tables created within the test database let $tab_count= 49; # --> crash # let $tab_count= 48; # --> no crash # It looks like it plays a role if the number of these tables # is higher than 48. # Attention: The database 'mysql' contains 16 tables. # 49 + 16 exceeds 64, maybe it plays a role # # 3. The last CREATE VIEW statement has an influence let $my_stmt= CREATE VIEW v2 AS SELECT t_CRASHME FROM v1; # --> crash # let $my_stmt= CREATE VIEW v2 AS SELECT f1 AS t_CRASHME FROM t_CRASHME; # --> no crash # It looks like it is needed, that v2 is based on the view v1 an NOT direct # on the base table t_CRASHME. # # 4. The column name has an influence let $col_name= t_CRASHME; # --> crash, Attention: The base table name is also t_CRASHME . # let $col_name= oscar; # --> crash, Attention: The base table name is also t_CRASHME . # It looks like it is needed, that the column name equals the name of the base table. # Some preparations --disable_warnings eval DROP SCHEMA IF EXISTS $working_db; --enable_warnings eval CREATE SCHEMA $working_db ; # Create the tables needed for the crash while ($tab_count) { EVAL CREATE TABLE t_$tab_count (f1 BIGINT); dec $tab_count ; } eval USE $working_db ; CREATE TABLE t_CRASHME ( f1 BIGINT); eval CREATE VIEW v1 ($col_name) AS SELECT f1 FROM t_CRASHME GROUP BY f1; # CREATE the VIEW v2 eval $my_stmt; # This statement will cause the crash if you select a variant with # the comment "# --> crash" in all 4 conditions mentioned above. SELECT * FROM INFORMATION_SCHEMA.TABLES;