diff options
-rw-r--r-- | mysql-test/r/show.result | 11 | ||||
-rw-r--r-- | mysql-test/t/show.test | 15 | ||||
-rw-r--r-- | sql/sql_show.cc | 6 |
3 files changed, 30 insertions, 2 deletions
diff --git a/mysql-test/r/show.result b/mysql-test/r/show.result index d1b373d8969..c087d1d96d7 100644 --- a/mysql-test/r/show.result +++ b/mysql-test/r/show.result @@ -40,5 +40,16 @@ nm varchar(32) YES NULL a int(11) YES NULL drop table t1; # +# MDEV-22883: Assertion `!parse_error || lex.sphead == 0' failed in +# Table_triggers_list::check_n_load | SIGSEGV in strxmov +# +CREATE TABLE t1 (a INT); +CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET @a=1; +CREATE TRIGGER tr2 BEFORE DELETE ON t1 FOR EACH ROW SET @b=1; +SET TMP_DISK_TABLE_SIZE= 1024; +SHOW TRIGGERS; +ERROR HY000: The table '(temporary)' is full +DROP TABLE t1; +# # End of 10.2 tests # diff --git a/mysql-test/t/show.test b/mysql-test/t/show.test index f2f6efc4e45..3dfc1c696e4 100644 --- a/mysql-test/t/show.test +++ b/mysql-test/t/show.test @@ -35,5 +35,20 @@ show fields from test.t1 where field in drop table t1; --echo # +--echo # MDEV-22883: Assertion `!parse_error || lex.sphead == 0' failed in +--echo # Table_triggers_list::check_n_load | SIGSEGV in strxmov +--echo # + +CREATE TABLE t1 (a INT); +CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET @a=1; +CREATE TRIGGER tr2 BEFORE DELETE ON t1 FOR EACH ROW SET @b=1; +SET TMP_DISK_TABLE_SIZE= 1024; +--error ER_RECORD_FILE_FULL +SHOW TRIGGERS; + +# Cleanup +DROP TABLE t1; + +--echo # --echo # End of 10.2 tests --echo # diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 721bb053343..105b2719882 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -4849,7 +4849,8 @@ end: */ DBUG_ASSERT(thd->open_tables == NULL); thd->mdl_context.rollback_to_savepoint(open_tables_state_backup->mdl_system_tables_svp); - thd->clear_error(); + if (!thd->is_fatal_error) + thd->clear_error(); return res; } @@ -5064,7 +5065,7 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond) continue; } - if (thd->killed == ABORT_QUERY) + if (thd->killed == ABORT_QUERY || thd->is_fatal_error) { error= 0; goto err; @@ -5079,6 +5080,7 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond) goto err; } } + // Here in 10.3 should be fixed IF with ABORT_QUERY as above } } } |