[MDEV-18787] Temporary table marked as crashed and further Assertion `! is_set()' failed upon SHOW CREATE TABLE Created: 2019-03-01  Updated: 2019-07-06  Resolved: 2019-07-06

Status: Closed
Project: MariaDB Server
Component/s: Admin statements, Data Definition - Temporary
Affects Version/s: 10.2, 10.3, 10.4
Fix Version/s: 10.2.23, 10.3.14, 10.4.4

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-17070 Table corruption or Assertion `table-... Closed
relates to MDEV-19595 ER_CRASHED_ON_USAGE and Assertion `!i... Closed

 Description   

CREATE TABLE t1 (i INT) ENGINE=Aria;
CREATE TEMPORARY TABLE t1 (f INT) ENGINE=Aria;
INSERT INTO t1 VALUES (1);
--error ER_CANT_DROP_FIELD_OR_KEY
ALTER TABLE t1 DROP INDEX idx, CHANGE COLUMN IF EXISTS a b INT;
SHOW CREATE TABLE t1;
 
# Cleanup
DROP TEMPORARY TABLE t1;
DROP TABLE t1;

10.2 80c3fd18

2019-03-01 19:45:08 140694675932928 [ERROR] mysqld: Table '/data/bld/10.2/mysql-test/var/tmp/mysqld.1/#sql369e_4_0' is marked as crashed and should be repaired
2019-03-01 19:45:08 140694675932928 [ERROR] mysqld: Table 't1' is marked as crashed and should be repaired
mysqld: /data/src/10.2/sql/sql_error.cc:420: void Diagnostics_area::set_eof_status(THD*): Assertion `! is_set()' failed.
190301 19:45:08 [ERROR] mysqld got signal 6 ;
 
#7  0x00007ff60d061ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x000055f79ef839e7 in Diagnostics_area::set_eof_status (this=0x7ff5ec005ca0, thd=0x7ff5ec000b00) at /data/src/10.2/sql/sql_error.cc:420
#9  0x000055f79eeed286 in my_eof (thd=0x7ff5ec000b00) at /data/src/10.2/sql/sql_class.h:4519
#10 0x000055f79f042e5b in mysqld_show_create (thd=0x7ff5ec000b00, table_list=0x7ff5ec012530) at /data/src/10.2/sql/sql_show.cc:1362
#11 0x000055f79efb2789 in mysql_execute_command (thd=0x7ff5ec000b00) at /data/src/10.2/sql/sql_parse.cc:4248
#12 0x000055f79efbe63d in mysql_parse (thd=0x7ff5ec000b00, rawbuf=0x7ff5ec012458 "SHOW CREATE TABLE t1", length=20, parser_state=0x7ff6082e3200, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:8018
#13 0x000055f79efabf77 in dispatch_command (command=COM_QUERY, thd=0x7ff5ec000b00, packet=0x7ff5ec08d761 "", packet_length=20, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1829
#14 0x000055f79efaa882 in do_command (thd=0x7ff5ec000b00) at /data/src/10.2/sql/sql_parse.cc:1379
#15 0x000055f79f0fdd42 in do_handle_one_connection (connect=0x55f7a28aa690) at /data/src/10.2/sql/sql_connect.cc:1336
#16 0x000055f79f0fdacf in handle_one_connection (arg=0x55f7a28aa690) at /data/src/10.2/sql/sql_connect.cc:1242
#17 0x000055f79f525584 in pfs_spawn_thread (arg=0x55f7a280de00) at /data/src/10.2/storage/perfschema/pfs.cc:1862
#18 0x00007ff60ed38494 in start_thread (arg=0x7ff6082e4700) at pthread_create.c:333
#19 0x00007ff60d11e93f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Not reproducible on 10.1.
Release build doesn't crash, but reports the table as crashed:

mysqltest: At line 6: query 'SHOW CREATE TABLE t1' failed: 145: Table '/data/bld/10.2-rel/mysql-test/var/tmp/mysqld.1/#sql3785_4_0' is marked as crashed and should be repaired
 
Warnings from just before the error:
Error 145 Table '/data/bld/10.2-rel/mysql-test/var/tmp/mysqld.1/#sql3785_4_0' is marked as crashed and should be repaired



 Comments   
Comment by Elena Stepanova [ 2019-07-06 ]

This particular problem was fixed (or at least disappeared) together with MDEV-17070.

commit 69abd43703fcf68c4cf1056bf5bd56c690de5b4e
Author: Sergei Golubchik
Date:   Sun Mar 10 18:55:35 2019 +0100
 
    MDEV-17070 Table corruption or Assertion `table->file->stats.records > 0 || error' or Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed upon actions on temporary table

There are more of a similar appearances, though. They will be filed separately if haven't yet.

Generated at Thu Feb 08 08:46:44 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.