Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
None
-
None
Description
SET sql_mode='TRADITIONAL'; |
CREATE TABLE t (c CHAR(1)) ENGINE=InnoDB; |
INSERT INTO t VALUES (0xE8),(0xE9),(0xEA),(0xEB),(0xEC),(0xED),(0xEE),(0xEF); |
SELECT * FROM (t AS t2 JOIN t AS t3 USING (a)) JOIN t USING (a); |
ALTER TABLE t CHANGE c c INT; |
SELECT * FROM t ORDER BY a; |
Leads to:
preview-10.10-MDEV-16329-online-alter 10.10.0 d7a7d16713070c7c2902c3df4b4f6d024cd0320f (Optimized) |
Core was generated by `/test/online-alter_MD080622-mariadb-10.10.0-linux-x86_64-opt/bin/mysqld --no-de'.
|
Program terminated with signal SIGSEGV, Segmentation fault.
|
#0 __GI___pthread_mutex_lock (mutex=mutex@entry=0x1e8)
|
at ../nptl/pthread_mutex_lock.c:67
|
[Current thread is 1 (Thread 0x14cec4054700 (LWP 982450))]
|
(gdb) bt
|
#0 __GI___pthread_mutex_lock (mutex=mutex@entry=0x1e8) at ../nptl/pthread_mutex_lock.c:67
|
#1 0x00005621d7d58346 in rw_pr_rdlock (rwlock=rwlock@entry=0x1e8) at /test/preview-10.10-MDEV-16329-online-alter_opt/mysys/thr_rwlock.c:282
|
#2 0x00005621d7783657 in inline_mysql_prlock_rdlock (that=0x1e8) at /test/preview-10.10-MDEV-16329-online-alter_opt/include/mysql/psi/mysql_thread.h:919
|
#3 MDL_context::visit_subgraph (this=0x150, gvisitor=gvisitor@entry=0x14cec40521c0) at /test/preview-10.10-MDEV-16329-online-alter_opt/sql/mdl.cc:2789
|
#4 0x00005621d77494df in TABLE_SHARE::visit_subgraph (this=0x14ce40016970, wait_for_flush=<optimized out>, gvisitor=0x14cec40521c0) at /test/preview-10.10-MDEV-16329-online-alter_opt/sql/table.cc:5507
|
#5 0x00005621d77836a8 in MDL_context::visit_subgraph (this=this@entry=0x14ce40000da8, gvisitor=gvisitor@entry=0x14cec40521c0) at /test/preview-10.10-MDEV-16329-online-alter_opt/sql/mdl.cc:2796
|
#6 0x00005621d7783a9a in MDL_context::find_deadlock (this=this@entry=0x14ce40000da8) at /test/preview-10.10-MDEV-16329-online-alter_opt/sql/mdl.cc:2820
|
#7 0x00005621d7749613 in TABLE_SHARE::wait_for_old_version (this=0x14ce40016970, thd=thd@entry=0x14ce40000c58, abstime=abstime@entry=0x14cec40522a0, deadlock_weight=deadlock_weight@entry=1) at /test/preview-10.10-MDEV-16329-online-alter_opt/sql/table.cc:5568
|
#8 0x00005621d782430a in tdc_wait_for_old_version (thd=thd@entry=0x14ce40000c58, db=<optimized out>, table_name=<optimized out>, wait_timeout=<optimized out>, deadlock_weight=1) at /test/preview-10.10-MDEV-16329-online-alter_opt/sql/table_cache.cc:1094
|
#9 0x00005621d75f3e63 in open_table (thd=0x14ce40000c58, table_list=0x14ce40010d90, ot_ctx=0x14cec40529a0) at /test/preview-10.10-MDEV-16329-online-alter_opt/sql/sql_base.h:561
|
#10 0x00005621d75f785a in open_and_process_table (ot_ctx=0x14cec40529a0, has_prelocking_list=false, prelocking_strategy=0x14cec4052a90, flags=0, counter=0x14cec4052a3c, tables=0x14ce40010d90, thd=0x14ce40000c58) at /test/preview-10.10-MDEV-16329-online-alter_opt/sql/sql_base.cc:4087
|
#11 open_tables (thd=thd@entry=0x14ce40000c58, options=@0x14ce400061b8: {m_options = DDL_options_st::OPT_NONE}, start=start@entry=0x14cec4052a28, counter=counter@entry=0x14cec4052a3c, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x14cec4052a90) at /test/preview-10.10-MDEV-16329-online-alter_opt/sql/sql_base.cc:4574
|
#12 0x00005621d75f800a in open_and_lock_tables (thd=thd@entry=0x14ce40000c58, options=<optimized out>, tables=<optimized out>, tables@entry=0x14ce40010d90, derived=derived@entry=true, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x14cec4052a90) at /test/preview-10.10-MDEV-16329-online-alter_opt/sql/sql_base.cc:5547
|
#13 0x00005621d765b0ed in open_and_lock_tables (flags=0, derived=true, tables=0x14ce40010d90, thd=0x14ce40000c58) at /test/preview-10.10-MDEV-16329-online-alter_opt/sql/sql_base.h:510
|
#14 execute_sqlcom_select (thd=0x14ce40000c58, all_tables=0x14ce40010d90) at /test/preview-10.10-MDEV-16329-online-alter_opt/sql/sql_parse.cc:6180
|
#15 0x00005621d7668cbd in mysql_execute_command (thd=0x14ce40000c58, is_called_from_prepared_stmt=<optimized out>) at /test/preview-10.10-MDEV-16329-online-alter_opt/sql/sql_parse.cc:3944
|
#16 0x00005621d7656345 in mysql_parse (rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, thd=0x14ce40000c58) at /test/preview-10.10-MDEV-16329-online-alter_opt/sql/sql_parse.cc:8036
|
#17 mysql_parse (thd=0x14ce40000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /test/preview-10.10-MDEV-16329-online-alter_opt/sql/sql_parse.cc:7958
|
#18 0x00005621d7661e5a in dispatch_command (command=COM_QUERY, thd=0x14ce40000c58, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /test/preview-10.10-MDEV-16329-online-alter_opt/sql/sql_class.h:1365
|
#19 0x00005621d7663d82 in do_command (thd=0x14ce40000c58, blocking=blocking@entry=true) at /test/preview-10.10-MDEV-16329-online-alter_opt/sql/sql_parse.cc:1407
|
#20 0x00005621d777ae7f in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5621d9d3c0e8, put_in_cache=put_in_cache@entry=true) at /test/preview-10.10-MDEV-16329-online-alter_opt/sql/sql_connect.cc:1418
|
#21 0x00005621d777b15d in handle_one_connection (arg=0x5621d9d3c0e8) at /test/preview-10.10-MDEV-16329-online-alter_opt/sql/sql_connect.cc:1312
|
#22 0x000014cedb8ef609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#23 0x000014cedb4db133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
preview-10.10-MDEV-16329-online-alter 10.10.0 d7a7d16713070c7c2902c3df4b4f6d024cd0320f (Debug) |
mysqld: /test/preview-10.10-MDEV-16329-online-alter_dbg/sql/table.cc:5496: bool TABLE_SHARE::visit_subgraph(Wait_for_flush*, MDL_wait_for_graph_visitor*): Assertion `table->in_use && tdc->flushed' failed.
|
preview-10.10-MDEV-16329-online-alter 10.10.0 d7a7d16713070c7c2902c3df4b4f6d024cd0320f (Debug) |
Core was generated by `/test/online-alter_MD080622-mariadb-10.10.0-linux-x86_64-dbg/bin/mysqld --no-de'.
|
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 0x145fc0148700 (LWP 564326))]
|
(gdb) bt
|
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
#1 0x0000145fe3ec0859 in __GI_abort () at abort.c:79
|
#2 0x0000145fe3ec0729 in __assert_fail_base (fmt=0x145fe4056588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5592f98a8f77 "table->in_use && tdc->flushed", file=0x5592f98a9508 "/test/preview-10.10-MDEV-16329-online-alter_dbg/sql/table.cc", line=5496, function=<optimized out>) at assert.c:92
|
#3 0x0000145fe3ed1fd6 in __GI___assert_fail (assertion=assertion@entry=0x5592f98a8f77 "table->in_use && tdc->flushed", file=file@entry=0x5592f98a9508 "/test/preview-10.10-MDEV-16329-online-alter_dbg/sql/table.cc", line=line@entry=5496, function=function@entry=0x5592f98aa1b0 "bool TABLE_SHARE::visit_subgraph(Wait_for_flush*, MDL_wait_for_graph_visitor*)") at assert.c:101
|
#4 0x00005592f8db36c8 in TABLE_SHARE::visit_subgraph (this=0x145f8001fa60, wait_for_flush=<optimized out>, gvisitor=0x145fc01461c0) at /test/preview-10.10-MDEV-16329-online-alter_dbg/sql/table.cc:5496
|
#5 0x00005592f8db3822 in Wait_for_flush::accept_visitor (this=<optimized out>, gvisitor=<optimized out>) at /test/preview-10.10-MDEV-16329-online-alter_dbg/sql/table.cc:5438
|
#6 0x00005592f8e09bca in MDL_context::visit_subgraph (this=this@entry=0x145f80000f08, gvisitor=gvisitor@entry=0x145fc01461c0) at /test/preview-10.10-MDEV-16329-online-alter_dbg/sql/mdl.cc:2792
|
#7 0x00005592f8e0a070 in MDL_context::find_deadlock (this=this@entry=0x145f80000f08) at /test/preview-10.10-MDEV-16329-online-alter_dbg/sql/mdl.cc:2820
|
#8 0x00005592f8db39d1 in TABLE_SHARE::wait_for_old_version (this=0x145f8001fa60, thd=thd@entry=0x145f80000db8, abstime=abstime@entry=0x145fc0146280, deadlock_weight=deadlock_weight@entry=1) at /test/preview-10.10-MDEV-16329-online-alter_dbg/sql/table.cc:5568
|
#9 0x00005592f8edbca3 in tdc_wait_for_old_version (thd=thd@entry=0x145f80000db8, db=<optimized out>, table_name=<optimized out>, wait_timeout=<optimized out>, deadlock_weight=1) at /test/preview-10.10-MDEV-16329-online-alter_dbg/sql/table_cache.cc:1094
|
#10 0x00005592f8c123cf in open_table (thd=thd@entry=0x145f80000db8, table_list=table_list@entry=0x145f800142b0, ot_ctx=ot_ctx@entry=0x145fc0146970) at /test/preview-10.10-MDEV-16329-online-alter_dbg/sql/sql_base.h:561
|
#11 0x00005592f8c16eaf in open_and_process_table (ot_ctx=0x145fc0146970, has_prelocking_list=false, prelocking_strategy=0x145fc0146a70, flags=0, counter=0x145fc0146a0c, tables=0x145f800142b0, thd=0x145f80000db8) at /test/preview-10.10-MDEV-16329-online-alter_dbg/sql/sql_base.cc:4087
|
#12 open_tables (thd=thd@entry=0x145f80000db8, options=@0x145f800064d8: {m_options = DDL_options_st::OPT_NONE}, start=start@entry=0x145fc01469f8, counter=counter@entry=0x145fc0146a0c, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x145fc0146a70) at /test/preview-10.10-MDEV-16329-online-alter_dbg/sql/sql_base.cc:4574
|
#13 0x00005592f8c17e41 in open_and_lock_tables (thd=thd@entry=0x145f80000db8, options=@0x145f800064d8: {m_options = DDL_options_st::OPT_NONE}, tables=<optimized out>, tables@entry=0x145f800142b0, derived=derived@entry=true, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x145fc0146a70) at /test/preview-10.10-MDEV-16329-online-alter_dbg/sql/sql_base.cc:5547
|
#14 0x00005592f8c92fc1 in open_and_lock_tables (flags=0, derived=true, tables=0x145f800142b0, thd=0x145f80000db8) at /test/preview-10.10-MDEV-16329-online-alter_dbg/sql/sql_base.h:510
|
#15 execute_sqlcom_select (thd=thd@entry=0x145f80000db8, all_tables=0x145f800142b0) at /test/preview-10.10-MDEV-16329-online-alter_dbg/sql/sql_parse.cc:6180
|
#16 0x00005592f8c9f744 in mysql_execute_command (thd=thd@entry=0x145f80000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/preview-10.10-MDEV-16329-online-alter_dbg/sql/sql_parse.cc:3944
|
#17 0x00005592f8c8d70e in mysql_parse (thd=thd@entry=0x145f80000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x145fc0147470) at /test/preview-10.10-MDEV-16329-online-alter_dbg/sql/sql_parse.cc:8036
|
#18 0x00005592f8c9acf6 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x145f80000db8, packet=packet@entry=0x145f8000b6e9 "SELECT * FROM t ORDER BY a", packet_length=packet_length@entry=26, blocking=blocking@entry=true) at /test/preview-10.10-MDEV-16329-online-alter_dbg/sql/sql_class.h:1365
|
#19 0x00005592f8c9d400 in do_command (thd=0x145f80000db8, blocking=blocking@entry=true) at /test/preview-10.10-MDEV-16329-online-alter_dbg/sql/sql_parse.cc:1407
|
#20 0x00005592f8dfe092 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5592fbb55368, put_in_cache=put_in_cache@entry=true) at /test/preview-10.10-MDEV-16329-online-alter_dbg/sql/sql_connect.cc:1418
|
#21 0x00005592f8dfe59b in handle_one_connection (arg=0x5592fbb55368) at /test/preview-10.10-MDEV-16329-online-alter_dbg/sql/sql_connect.cc:1312
|
#22 0x0000145fe43d1609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#23 0x0000145fe3fbd133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Testcase can likely be simplified further.
Attachments
Issue Links
- duplicates
-
MDEV-28774 Assertion `table->in_use && tdc->flushed' failed in bool TABLE_SHARE::visit_subgraph(Wait_for_flush*, MDL_wait_for_graph_visitor*)
- Closed
- is caused by
-
MDEV-16329 Engine-independent online ALTER TABLE
- Closed
- is duplicated by
-
MDEV-28825 Server crash in binlog_online_alter_end_trans
- Closed