Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
-
10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6
-
None
Description
SET debug_dbug='+d,row_drop_table_add_to_background';
|
CREATE TABLE t1 (a INT NOT NULL) ENGINE=InnoDB;
|
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
|
DROP TABLE t1;
|
Leads to:
10.2.38 (Debug) |
mysqld: /test/10.2_dbg/sql/handler.cc:3989: uint handler::get_dup_key(int): Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2' failed.
|
10.2.38 (Debug) |
Core was generated by `/test/MD160321-mariadb-10.2.38-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
|
Program terminated with signal SIGABRT, Aborted.
|
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
|
at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
|
[Current thread is 1 (Thread 0x1516dc9dc700 (LWP 3902701))]
|
(gdb) bt
|
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
|
#1 0x000055d689c16f9a in my_write_core (sig=sig@entry=6) at /test/10.2_dbg/mysys/stacktrace.c:382
|
#2 0x000055d6894fd043 in handle_fatal_signal (sig=6) at /test/10.2_dbg/sql/signal_handler.cc:343
|
#3 <signal handler called>
|
#4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
#5 0x00001516f7a64859 in __GI_abort () at abort.c:79
|
#6 0x00001516f7a64729 in __assert_fail_base (fmt=0x1516f7bfa588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55d689d800c0 "table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2", file=0x55d689d81169 "/test/10.2_dbg/sql/handler.cc", line=3989, function=<optimized out>) at assert.c:92
|
#7 0x00001516f7a75f36 in __GI___assert_fail (assertion=assertion@entry=0x55d689d800c0 "table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2", file=file@entry=0x55d689d81169 "/test/10.2_dbg/sql/handler.cc", line=line@entry=3989, function=function@entry=0x55d689d80518 "uint handler::get_dup_key(int)") at assert.c:101
|
#8 0x000055d68950622e in handler::get_dup_key (this=this@entry=0x151698011aa0, error=error@entry=121) at /test/10.2_dbg/sql/handler.cc:3991
|
#9 0x000055d6895064fe in handler::print_error (this=0x151698011aa0, error=121, errflag=0) at /test/10.2_dbg/sql/handler.cc:3575
|
#10 0x000055d689507d4f in ha_delete_table (thd=thd@entry=0x151698000d90, table_type=<optimized out>, path=path@entry=0x1516dc9d9b50 "./test/t1", db=<optimized out>, db@entry=0x151698011870 "test", alias=<optimized out>, generate_warning=generate_warning@entry=true) at /test/10.2_dbg/sql/handler.cc:2464
|
#11 0x000055d689397d4c in mysql_rm_table_no_locks (thd=thd@entry=0x151698000d90, tables=tables@entry=0x151698011258, if_exists=if_exists@entry=false, drop_temporary=drop_temporary@entry=false, drop_view=drop_view@entry=false, dont_log_query=dont_log_query@entry=false, dont_free_locks=false) at /test/10.2_dbg/sql/sql_table.cc:2447
|
#12 0x000055d689398e3a in mysql_rm_table (thd=thd@entry=0x151698000d90, tables=tables@entry=0x151698011258, if_exists=<optimized out>, drop_temporary=<optimized out>) at /test/10.2_dbg/sql/sql_table.cc:2089
|
#13 0x000055d6892fa2b9 in mysql_execute_command (thd=thd@entry=0x151698000d90) at /test/10.2_dbg/sql/structs.h:530
|
#14 0x000055d6892ffe33 in mysql_parse (thd=thd@entry=0x151698000d90, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1516dc9db550, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.2_dbg/sql/sql_parse.cc:7790
|
#15 0x000055d689302933 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x151698000d90, packet=packet@entry=0x1516980195d1 "DROP TABLE t1", packet_length=packet_length@entry=13, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.2_dbg/sql/sql_class.h:1109
|
#16 0x000055d68930573c in do_command (thd=0x151698000d90) at /test/10.2_dbg/sql/sql_parse.cc:1381
|
#17 0x000055d689408bcc in do_handle_one_connection (connect=connect@entry=0x55d68bbe02e0) at /test/10.2_dbg/sql/sql_connect.cc:1336
|
#18 0x000055d689408df7 in handle_one_connection (arg=0x55d68bbe02e0) at /test/10.2_dbg/sql/sql_connect.cc:1241
|
#19 0x00001516f7f6a609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#20 0x00001516f7b61293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Bug confirmed present in:
MariaDB: 10.2.38 (dbg)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.3.29 (dbg), 10.4.19 (dbg), 10.5.10 (dbg), 10.6.0 (dbg)
Attachments
Issue Links
- is blocked by
-
MDEV-21175 Remove dict_table_t::n_foreign_key_checks_running from InnoDB
-
- Closed
-
- relates to
-
MDEV-25696 Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2' failed in handler::get_dup_key
-
- Confirmed
-
Activity
Field | Original Value | New Value |
---|---|---|
Labels | not-10.3 not-10.4 not-10.5 not-10.6 | need_feedback not-10.3 not-10.4 not-10.5 not-10.6 |
Labels | need_feedback not-10.3 not-10.4 not-10.5 not-10.6 | not-10.3 not-10.4 not-10.5 not-10.6 |
Labels | not-10.3 not-10.4 not-10.5 not-10.6 | need_feedback not-10.3 not-10.4 not-10.5 not-10.6 |
Component/s | Storage Engine - InnoDB [ 10129 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Affects Version/s | 10.3 [ 22126 ] | |
Affects Version/s | 10.4 [ 22408 ] | |
Affects Version/s | 10.5 [ 23123 ] | |
Affects Version/s | 10.6 [ 24028 ] | |
Assignee | Oleksandr Byelkin [ sanja ] | Marko Mäkelä [ marko ] |
Labels | need_feedback not-10.3 not-10.4 not-10.5 not-10.6 |
Link |
This issue is blocked by |
Comment |
[ Found this almost identical stack, with a very different testcase.
{noformat} Original post: table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2|SIGABRT|handler::get_dup_key|handler::print_error|ha_delete_table|mysql_rm_table_no_locks Newly found: table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2|SIGABRT|handler::get_dup_key|handler::print_error|open_table_from_share|open_table {noformat} {code:sql} SET sql_mode=''; CREATE TABLE t1 (c INT PRIMARY KEY) ENGINE=MyISAM; INSERT INTO t1 VALUES (0); CREATE TABLE t2 (a INT NOT NULL) ENGINE=CSV; CREATE TRIGGER tr AFTER INSERT ON t2 FOR EACH ROW INSERT INTO t2 VALUES (1); INSERT INTO t2 VALUES (0); CHECK TABLE t2; INSERT INTO t1 VALUES (0); INSERT INTO t2 VALUES (0),(0); {code} Leads to: {noformat:title=10.6.1 f8665314d4ba190679001b81bb7d9fd7a38fc0f6 (Debug)} mysqld: /test/10.6_dbg/sql/handler.cc:4439: uint handler::get_dup_key(int): Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2' failed. {noformat} {noformat:title=10.6.1 f8665314d4ba190679001b81bb7d9fd7a38fc0f6 (Debug)} Core was generated by `/test/MD100521-mariadb-10.6.1-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'. Program terminated with signal SIGABRT, Aborted. #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 [Current thread is 1 (Thread 0x153ce474d700 (LWP 611758))] (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x0000153cefbb2859 in __GI_abort () at abort.c:79 #2 0x0000153cefbb2729 in __assert_fail_base (fmt=0x153cefd48588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x555e618206d8 "table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2", file=0x555e6181e80b "/test/10.6_dbg/sql/handler.cc", line=4439, function=<optimized out>) at assert.c:92 #3 0x0000153cefbc3f36 in __GI___assert_fail (assertion=assertion@entry=0x555e618206d8 "table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2", file=file@entry=0x555e6181e80b "/test/10.6_dbg/sql/handler.cc", line=line@entry=4439, function=function@entry=0x555e61820c68 "uint handler::get_dup_key(int)") at assert.c:101 #4 0x0000555e60cc6404 in handler::get_dup_key (this=this@entry=0x153c8007cec0, error=error@entry=121) at /test/10.6_dbg/sql/handler.cc:4439 #5 0x0000555e60cc6626 in handler::print_error (this=0x153c8007cec0, error=121, errflag=0) at /test/10.6_dbg/sql/handler.cc:4014 #6 0x0000555e60b03a58 in open_table_from_share (thd=thd@entry=0x153c80000db8, share=share@entry=0x153c800a1050, alias=alias@entry=0x153c80014108, db_stat=db_stat@entry=33, prgflag=prgflag@entry=8, ha_open_flags=18, outparam=0x153c800a3408, is_create_table=false, partitions_to_open=0x0) at /test/10.6_dbg/sql/table.cc:4312 #7 0x0000555e6095c5f7 in open_table (thd=thd@entry=0x153c80000db8, table_list=table_list@entry=0x153c800140c0, ot_ctx=ot_ctx@entry=0x153ce474bb00) at /test/10.6_dbg/sql/sql_base.cc:2001 #8 0x0000555e60960eb8 in open_and_process_table (ot_ctx=0x153ce474bb00, has_prelocking_list=false, prelocking_strategy=0x153ce474bce0, flags=0, counter=0x153ce474bb9c, tables=0x153c800140c0, thd=0x153c80000db8) at /test/10.6_dbg/sql/sql_base.cc:3809 #9 open_tables (thd=thd@entry=0x153c80000db8, options=@0x153c80006620: {m_options = DDL_options_st::OPT_NONE}, start=start@entry=0x153ce474bb88, counter=counter@entry=0x153ce474bb9c, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x153ce474bce0) at /test/10.6_dbg/sql/sql_base.cc:4292 #10 0x0000555e60961f32 in open_and_lock_tables (thd=thd@entry=0x153c80000db8, options=@0x153c80006620: {m_options = DDL_options_st::OPT_NONE}, tables=<optimized out>, tables@entry=0x153c800140c0, derived=derived@entry=true, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x153ce474bce0) at /test/10.6_dbg/sql/sql_base.cc:5254 #11 0x0000555e609aab97 in open_and_lock_tables (flags=0, derived=true, tables=0x153c800140c0, thd=0x153c80000db8) at /test/10.6_dbg/sql/sql_base.h:509 #12 mysql_insert (thd=thd@entry=0x153c80000db8, table_list=0x153c800140c0, fields=@0x153c80006008: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x555e61fd3480 <end_of_list>, last = 0x153c80006008, elements = 0}, <No data fields>}, values_list=@0x153c80006050: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153c80014d00, last = 0x153c80014dd8, elements = 2}, <No data fields>}, update_fields=@0x153c80006038: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x555e61fd3480 <end_of_list>, last = 0x153c80006038, elements = 0}, <No data fields>}, update_values=@0x153c80006020: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x555e61fd3480 <end_of_list>, last = 0x153c80006020, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0) at /test/10.6_dbg/sql/sql_insert.cc:756 #13 0x0000555e609f3824 in mysql_execute_command (thd=thd@entry=0x153c80000db8) at /test/10.6_dbg/sql/sql_parse.cc:4559 #14 0x0000555e609de02b in mysql_parse (thd=thd@entry=0x153c80000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x153ce474c410) at /test/10.6_dbg/sql/sql_parse.cc:8018 #15 0x0000555e609ece5d in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x153c80000db8, packet=packet@entry=0x153c8000b799 "INSERT INTO t2 VALUES (0),(0)", packet_length=packet_length@entry=29, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1333 #16 0x0000555e609f0250 in do_command (thd=0x153c80000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1406 #17 0x0000555e60b4adec in do_handle_one_connection (connect=<optimized out>, connect@entry=0x555e639986c8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410 #18 0x0000555e60b4b3f1 in handle_one_connection (arg=arg@entry=0x555e639986c8) at /test/10.6_dbg/sql/sql_connect.cc:1312 #19 0x0000555e60ffdcee in pfs_spawn_thread (arg=0x555e6388a418) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201 #20 0x0000153cf00c0609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #21 0x0000153cefcaf293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 {noformat} Bug confirmed present in: MariaDB: 10.2.38 (dbg), 10.3.29 (dbg), 10.4.19 (dbg), 10.5.10 (dbg), 10.6.1 (dbg) Bug (or feature/syntax) confirmed not present in: MariaDB: 10.2.38 (opt), 10.3.29 (opt), 10.4.19 (opt), 10.5.10 (opt), 10.6.1 (opt) MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.34 (dbg), 5.7.34 (opt), 8.0.24 (dbg), 8.0.24 (opt) ] |
Link | This issue relates to MDEV-25696 [ MDEV-25696 ] |
Fix Version/s | 10.6 [ 24028 ] |
Workflow | MariaDB v3 [ 121336 ] | MariaDB v4 [ 142797 ] |
Fix Version/s | 10.2 [ 14601 ] |
Fix Version/s | 10.6.2 [ 25800 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Resolution | Won't Fix [ 2 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
ramesh, is it a bug? may be it's supposed to crash. Please, clarify.