Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-23898

Server crashes and assertion failures upon handling sequences as base tables

    XMLWordPrintable

Details

    Description

      I only keep this report's priority as Major because technically it is a non-debug crash. The test scenario is pretty stupid, I think the main problem here is that MariaDB server allows doing such things to sequences at all (creating triggers, ALTER TABLE, etc).

      Please note that with all variations of the test case below, the problem is already visible upon SELECT NEXTVAL(s) which ends with ER_NO_SUCH_TABLE. The test cases allow the error so that they can proceed to an even more obvious problem (crash or assertion failure), but there is no good reason why ER_NO_SUCH_TABLE would be happening there.

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (a INT) ENGINE=InnoDB;
      CREATE TABLE t2 (a INT) ENGINE=InnoDB;
      CREATE SEQUENCE s ENGINE=InnoDB;
      CREATE TRIGGER tr AFTER INSERT ON s FOR EACH ROW UPDATE t2 SET a = 4;
       
      CREATE TEMPORARY TABLE tmp (b INT) ENGINE=MyISAM;
      INSERT INTO tmp VALUES (1),(2);
       
      --connect (con1,localhost,root,,test)
      START TRANSACTION;
      SELECT * FROM t1;
       
      --connection default
      ALTER TABLE s FORCE;
       
      --connection con1
      --error ER_NO_SUCH_TABLE
      SELECT NEXTVAL(s);
       
      --connection default
      CREATE TABLE s ENGINE=MyISAM SELECT b FROM tmp;
      

      10.3 d99f7872 non-debug

      #3  <signal handler called>
      #4  THD::is_error (this=0x0) at /data/src/10.3/sql/sql_class.h:3878
      #5  TABLE::verify_constraints (this=0x7f0ffc127df8, ignore_failure=false) at /data/src/10.3/sql/table.cc:5389
      #6  0x0000558fcf365457 in TABLE_LIST::view_check_option (this=0x7f0ffc00f830, thd=<optimized out>, ignore_failure=<optimized out>) at /data/src/10.3/sql/table.cc:5379
      #7  0x0000558fcf26fecf in select_insert::send_data (values=..., this=0x7f0ffc010848) at /data/src/10.3/sql/sql_insert.cc:3928
      #8  select_insert::send_data (this=0x7f0ffc010848, values=...) at /data/src/10.3/sql/sql_insert.cc:3900
      #9  0x0000558fcf2f21f5 in end_send (join=0x7f0ffc010940, join_tab=0x7f0ffc013068, end_of_records=<optimized out>) at /data/src/10.3/sql/sql_select.cc:20894
      #10 0x0000558fcf2ce389 in evaluate_join_record (join=join@entry=0x7f0ffc010940, join_tab=join_tab@entry=0x7f0ffc012cd8, error=<optimized out>) at /data/src/10.3/sql/sql_select.cc:19934
      #11 0x0000558fcf2dc128 in sub_select (end_of_records=false, join_tab=0x7f0ffc012cd8, join=0x7f0ffc010940) at /data/src/10.3/sql/sql_select.cc:19753
      #12 sub_select (join=0x7f0ffc010940, join_tab=0x7f0ffc012cd8, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19649
      #13 0x0000558fcf30627e in do_select (procedure=<optimized out>, join=0x7f0ffc010940) at /data/src/10.3/sql/sql_select.cc:19254
      #14 JOIN::exec_inner (this=this@entry=0x7f0ffc010940) at /data/src/10.3/sql/sql_select.cc:4116
      #15 0x0000558fcf3064f7 in JOIN::exec (this=this@entry=0x7f0ffc010940) at /data/src/10.3/sql/sql_select.cc:3910
      #16 0x0000558fcf306642 in mysql_select (thd=0x7f0ffc000c48, tables=0x7f0ffc00fff8, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2416184064, result=0x7f0ffc010848, unit=0x7f0ffc004950, select_lex=0x7f0ffc0050d8) at /data/src/10.3/sql/sql_select.cc:4315
      #17 0x0000558fcf306f7b in handle_select (thd=thd@entry=0x7f0ffc000c48, lex=lex@entry=0x7f0ffc004890, result=result@entry=0x7f0ffc010848, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/src/10.3/sql/sql_select.cc:370
      #18 0x0000558fcf33ea36 in Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x7f0ffc000c48) at /data/src/10.3/sql/sql_table.cc:11235
      #19 0x0000558fcf2a0a68 in mysql_execute_command (thd=0x7f0ffc000c48) at /data/src/10.3/sql/sql_parse.cc:6022
      #20 0x0000558fcf2a8063 in mysql_parse (thd=0x7f0ffc000c48, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:7810
      #21 0x0000558fcf2aa44d in dispatch_command (command=COM_QUERY, thd=0x7f0ffc000c48, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_class.h:1137
      #22 0x0000558fcf2ac3ed in do_command (thd=0x7f0ffc000c48) at /data/src/10.3/sql/sql_parse.cc:1393
      #23 0x0000558fcf392f26 in do_handle_one_connection (connect=connect@entry=0x558fd2abf1e8) at /data/src/10.3/sql/sql_connect.cc:1403
      #24 0x0000558fcf3930ff in handle_one_connection (arg=arg@entry=0x558fd2abf1e8) at /data/src/10.3/sql/sql_connect.cc:1308
      #25 0x0000558fcf969786 in pfs_spawn_thread (arg=0x558fd2a6a408) at /data/src/10.3/storage/perfschema/pfs.cc:1869
      #26 0x00007f104e051609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #27 0x00007f104dc46293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.3 d99f7872 debug

      mysqld: /data/src/10.3/sql/sql_base.cc:5351: bool lock_tables(THD*, TABLE_LIST*, uint, uint): Assertion `thd->lock == 0' failed.
      201006 21:54:47 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007efe40e13f36 in __GI___assert_fail (assertion=0x561caa4a9102 "thd->lock == 0", file=0x561caa4a7808 "/data/src/10.3/sql/sql_base.cc", line=5351, function=0x561caa4a92f0 "bool lock_tables(THD*, TABLE_LIST*, uint, uint)") at assert.c:101
      #8  0x0000561ca9787dda in lock_tables (thd=0x7efde4000d90, tables=0x7efde408fa30, count=1, flags=0) at /data/src/10.3/sql/sql_base.cc:5351
      #9  0x0000561ca9921e27 in mysql_update (thd=0x7efde4000d90, table_list=0x7efde408fa30, fields=..., values=..., conds=0x0, order_num=0, order=0x0, limit=18446744073709551615, ignore=false, found_return=0x7efe35fcb6c0, updated_return=0x7efe35fcb780) at /data/src/10.3/sql/sql_update.cc:370
      #10 0x0000561ca981bf6e in mysql_execute_command (thd=0x7efde4000d90) at /data/src/10.3/sql/sql_parse.cc:4285
      #11 0x0000561ca9738566 in sp_instr_stmt::exec_core (this=0x7efde4090270, thd=0x7efde4000d90, nextp=0x7efe35fcbddc) at /data/src/10.3/sql/sp_head.cc:3702
      #12 0x0000561ca97379e8 in sp_lex_keeper::reset_lex_and_exec_core (this=0x7efde40902b8, thd=0x7efde4000d90, nextp=0x7efe35fcbddc, open_tables=false, instr=0x7efde4090270) at /data/src/10.3/sql/sp_head.cc:3434
      #13 0x0000561ca973812e in sp_instr_stmt::execute (this=0x7efde4090270, thd=0x7efde4000d90, nextp=0x7efe35fcbddc) at /data/src/10.3/sql/sp_head.cc:3608
      #14 0x0000561ca97319fa in sp_head::execute (this=0x7efde408ed18, thd=0x7efde4000d90, merge_da_on_success=false) at /data/src/10.3/sql/sp_head.cc:1377
      #15 0x0000561ca9732ecf in sp_head::execute_trigger (this=0x7efde408ed18, thd=0x7efde4000d90, db_name=0x7efde4168400, table_name=0x7efde4168410, grant_info=0x7efde40ad018) at /data/src/10.3/sql/sp_head.cc:1873
      #16 0x0000561ca9914b2c in Table_triggers_list::process_triggers (this=0x7efde40acb28, thd=0x7efde4000d90, event=TRG_EVENT_INSERT, time_type=TRG_ACTION_AFTER, old_row_is_record1=true) at /data/src/10.3/sql/sql_trigger.cc:2222
      #17 0x0000561ca97da823 in write_record (thd=0x7efde4000d90, table=0x7efde40a8890, info=0x7efde4013c38) at /data/src/10.3/sql/sql_insert.cc:2053
      #18 0x0000561ca97dffb1 in select_insert::send_data (this=0x7efde4013bf0, values=...) at /data/src/10.3/sql/sql_insert.cc:3936
      #19 0x0000561ca9898633 in end_send (join=0x7efde4013ce8, join_tab=0x7efde4016410, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:20894
      #20 0x0000561ca9895c7b in evaluate_join_record (join=0x7efde4013ce8, join_tab=0x7efde4016080, error=0) at /data/src/10.3/sql/sql_select.cc:19934
      #21 0x0000561ca9895535 in sub_select (join=0x7efde4013ce8, join_tab=0x7efde4016080, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19714
      #22 0x0000561ca9894a07 in do_select (join=0x7efde4013ce8, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:19254
      #23 0x0000561ca986b8fb in JOIN::exec_inner (this=0x7efde4013ce8) at /data/src/10.3/sql/sql_select.cc:4116
      #24 0x0000561ca986acba in JOIN::exec (this=0x7efde4013ce8) at /data/src/10.3/sql/sql_select.cc:3910
      #25 0x0000561ca986bfd7 in mysql_select (thd=0x7efde4000d90, tables=0x7efde40133a0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2416184064, result=0x7efde4013bf0, unit=0x7efde4004c58, select_lex=0x7efde40053e0) at /data/src/10.3/sql/sql_select.cc:4315
      #26 0x0000561ca985d5fe in handle_select (thd=0x7efde4000d90, lex=0x7efde4004b98, result=0x7efde4013bf0, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:370
      #27 0x0000561ca990b10c in Sql_cmd_create_table_like::execute (this=0x7efde4012bb8, thd=0x7efde4000d90) at /data/src/10.3/sql/sql_table.cc:11235
      #28 0x0000561ca9822a49 in mysql_execute_command (thd=0x7efde4000d90) at /data/src/10.3/sql/sql_parse.cc:6022
      #29 0x0000561ca98282ae in mysql_parse (thd=0x7efde4000d90, rawbuf=0x7efde4012ab8 "CREATE TABLE s ENGINE=MyISAM SELECT b FROM tmp", length=46, parser_state=0x7efe35fcd5c0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7810
      #30 0x0000561ca9814a6f in dispatch_command (command=COM_QUERY, thd=0x7efde4000d90, packet=0x7efde4008f11 "CREATE TABLE s ENGINE=MyISAM SELECT b FROM tmp", packet_length=46, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1847
      #31 0x0000561ca981340f in do_command (thd=0x7efde4000d90) at /data/src/10.3/sql/sql_parse.cc:1393
      #32 0x0000561ca9990c24 in do_handle_one_connection (connect=0x561cac058e10) at /data/src/10.3/sql/sql_connect.cc:1403
      #33 0x0000561ca9990980 in handle_one_connection (arg=0x561cac058e10) at /data/src/10.3/sql/sql_connect.cc:1308
      #34 0x0000561caa356767 in pfs_spawn_thread (arg=0x561cabfc1600) at /data/src/10.3/storage/perfschema/pfs.cc:1869
      #35 0x00007efe41325609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #36 0x00007efe40eff293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Reproducible on 10.3+, debug and non-debug as shown above. ASAN builds fail the same way.

      A slightly different test case (trigger doesn't update a table) causes the same SIGSEGV also on a debug build, instead of the assertion failure:

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (a INT) ENGINE=InnoDB;
      CREATE SEQUENCE s ENGINE=InnoDB;
      CREATE TRIGGER tr AFTER INSERT ON s FOR EACH ROW SET @a= 1;
       
      CREATE TEMPORARY TABLE tmp (b INT) ENGINE=MyISAM;
      INSERT INTO tmp VALUES (1),(2);
       
      --connect (con1,localhost,root,,test)
      START TRANSACTION;
      SELECT * FROM t1;
       
      --connection default
      ALTER TABLE s FORCE;
       
      --connection con1
      --error ER_NO_SUCH_TABLE
      SELECT NEXTVAL(s);
       
      --connection default
      CREATE TABLE s ENGINE=MyISAM SELECT b FROM tmp;
      

      10.3 d99f7872 debug

      #3  <signal handler called>
      #4  0x000055f544001b3c in THD::is_error (this=0x0) at /data/src/10.3/sql/sql_class.h:3878
      #5  0x000055f544242d8f in TABLE::verify_constraints (this=0x7fdee0074040, ignore_failure=false) at /data/src/10.3/sql/table.cc:5389
      #6  0x000055f544242d1d in TABLE_LIST::view_check_option (this=0x7fdee0012bd8, thd=0x7fdee0000d90, ignore_failure=false) at /data/src/10.3/sql/table.cc:5379
      #7  0x000055f5440def62 in select_insert::send_data (this=0x7fdee0013bf0, values=...) at /data/src/10.3/sql/sql_insert.cc:3928
      #8  0x000055f544197633 in end_send (join=0x7fdee0013ce8, join_tab=0x7fdee0016408, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:20894
      #9  0x000055f544194c7b in evaluate_join_record (join=0x7fdee0013ce8, join_tab=0x7fdee0016078, error=0) at /data/src/10.3/sql/sql_select.cc:19934
      #10 0x000055f54419470d in sub_select (join=0x7fdee0013ce8, join_tab=0x7fdee0016078, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19753
      #11 0x000055f544193a07 in do_select (join=0x7fdee0013ce8, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:19254
      #12 0x000055f54416a8fb in JOIN::exec_inner (this=0x7fdee0013ce8) at /data/src/10.3/sql/sql_select.cc:4116
      #13 0x000055f544169cba in JOIN::exec (this=0x7fdee0013ce8) at /data/src/10.3/sql/sql_select.cc:3910
      #14 0x000055f54416afd7 in mysql_select (thd=0x7fdee0000d90, tables=0x7fdee00133a0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2416184064, result=0x7fdee0013bf0, unit=0x7fdee0004c58, select_lex=0x7fdee00053e0) at /data/src/10.3/sql/sql_select.cc:4315
      #15 0x000055f54415c5fe in handle_select (thd=0x7fdee0000d90, lex=0x7fdee0004b98, result=0x7fdee0013bf0, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:370
      #16 0x000055f54420a10c in Sql_cmd_create_table_like::execute (this=0x7fdee0012bb8, thd=0x7fdee0000d90) at /data/src/10.3/sql/sql_table.cc:11235
      #17 0x000055f544121a49 in mysql_execute_command (thd=0x7fdee0000d90) at /data/src/10.3/sql/sql_parse.cc:6022
      #18 0x000055f5441272ae in mysql_parse (thd=0x7fdee0000d90, rawbuf=0x7fdee0012ab8 "CREATE TABLE s ENGINE=MyISAM SELECT b FROM tmp", length=46, parser_state=0x7fdf3454e5c0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7810
      #19 0x000055f544113a6f in dispatch_command (command=COM_QUERY, thd=0x7fdee0000d90, packet=0x7fdee0008f11 "CREATE TABLE s ENGINE=MyISAM SELECT b FROM tmp", packet_length=46, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1847
      #20 0x000055f54411240f in do_command (thd=0x7fdee0000d90) at /data/src/10.3/sql/sql_parse.cc:1393
      #21 0x000055f54428fc24 in do_handle_one_connection (connect=0x55f54743e1c0) at /data/src/10.3/sql/sql_connect.cc:1403
      #22 0x000055f54428f980 in handle_one_connection (arg=0x55f54743e1c0) at /data/src/10.3/sql/sql_connect.cc:1308
      #23 0x000055f544c55767 in pfs_spawn_thread (arg=0x55f5473a6810) at /data/src/10.3/storage/perfschema/pfs.cc:1869
      #24 0x00007fdf3b8a3609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #25 0x00007fdf3b47d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Another slightly different test case which fails with an essentially different stack trace, although still in THD::is_error:

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (a INT) ENGINE=InnoDB;
      CREATE SEQUENCE s ENGINE=InnoDB;
      CREATE TRIGGER tr AFTER INSERT ON s FOR EACH ROW SET @a= 1;
       
      CREATE TEMPORARY TABLE tmp (b INT) ENGINE=MyISAM;
      INSERT INTO tmp VALUES (1),(2);
       
      --connect (con1,localhost,root,,test)
      START TRANSACTION;
      SELECT * FROM t1;
       
      --connection default
      ALTER TABLE s FORCE;
       
      --connection con1
      --error ER_NO_SUCH_TABLE
      SELECT NEXTVAL(s);
       
      --connection default
      CREATE TABLE s (b INT, KEY(b)) ENGINE=MyISAM SELECT 1;
      

      10.3 d99f7872 non-debug

      #3  <signal handler called>
      #4  THD::is_error (this=0x0) at /data/src/10.3/sql/sql_class.h:3878
      #5  ha_myisam::enable_indexes (this=this@entry=0x7f6dc80df420, mode=2) at /data/src/10.3/storage/myisam/ha_myisam.cc:1585
      #6  0x00005622fe9783cb in ha_myisam::enable_indexes (mode=2, this=0x7f6dc80df420) at /data/src/10.3/storage/myisam/ha_myisam.cc:1582
      #7  ha_myisam::end_bulk_insert (this=0x7f6dc80df420) at /data/src/10.3/storage/myisam/ha_myisam.cc:1775
      #8  ha_myisam::end_bulk_insert (this=0x7f6dc80df420) at /data/src/10.3/storage/myisam/ha_myisam.cc:1749
      #9  0x00005622fe2efdad in select_insert::prepare_eof (this=this@entry=0x7f6dc80104d8) at /data/src/10.3/sql/sql_class.h:3834
      #10 0x00005622fe2f003d in select_create::send_eof (this=0x7f6dc80104d8) at /data/src/10.3/sql/sql_insert.cc:4666
      #11 0x00005622fe381f82 in JOIN::exec_inner (this=this@entry=0x7f6dc80105d0) at /data/src/10.3/sql/sql_select.cc:4002
      #12 0x00005622fe3824f7 in JOIN::exec (this=this@entry=0x7f6dc80105d0) at /data/src/10.3/sql/sql_select.cc:3910
      #13 0x00005622fe382642 in mysql_select (thd=0x7f6dc8000c48, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2416184064, result=0x7f6dc80104d8, unit=0x7f6dc8004950, select_lex=0x7f6dc80050d8) at /data/src/10.3/sql/sql_select.cc:4315
      #14 0x00005622fe382f7b in handle_select (thd=thd@entry=0x7f6dc8000c48, lex=lex@entry=0x7f6dc8004890, result=result@entry=0x7f6dc80104d8, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/src/10.3/sql/sql_select.cc:370
      #15 0x00005622fe3baa36 in Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x7f6dc8000c48) at /data/src/10.3/sql/sql_table.cc:11235
      #16 0x00005622fe31ca68 in mysql_execute_command (thd=0x7f6dc8000c48) at /data/src/10.3/sql/sql_parse.cc:6022
      #17 0x00005622fe324063 in mysql_parse (thd=0x7f6dc8000c48, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:7810
      #18 0x00005622fe32644d in dispatch_command (command=COM_QUERY, thd=0x7f6dc8000c48, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_class.h:1137
      #19 0x00005622fe3283ed in do_command (thd=0x7f6dc8000c48) at /data/src/10.3/sql/sql_parse.cc:1393
      #20 0x00005622fe40ef26 in do_handle_one_connection (connect=connect@entry=0x5623005c5228) at /data/src/10.3/sql/sql_connect.cc:1403
      #21 0x00005622fe40f0ff in handle_one_connection (arg=arg@entry=0x5623005c5228) at /data/src/10.3/sql/sql_connect.cc:1308
      #22 0x00005622fe9e5786 in pfs_spawn_thread (arg=0x562300570408) at /data/src/10.3/storage/perfschema/pfs.cc:1869
      #23 0x00007f6e1f47f609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #24 0x00007f6e1f074293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      And yet another one, slightly different test case, different stack traces and failing assertion.

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (a INT) ENGINE=InnoDB;
      INSERT INTO t1 VALUES (1),(2);
      CREATE SEQUENCE s ENGINE=InnoDB;
      CREATE TRIGGER tr AFTER INSERT ON s FOR EACH ROW SET @a = 1;
       
      --connect (con1,localhost,root,,test)
      START TRANSACTION;
      SELECT * FROM t1;
       
      --connection default
      ALTER TABLE s FORCE;
       
      --connection con1
      --error ER_NO_SUCH_TABLE
      SELECT NEXTVAL(s);
       
      --connection default
      CREATE TABLE s ENGINE=MyISAM AS SELECT * FROM t1;
      

      10.3 d99f7872 non-debug

      #3  <signal handler called>
      #4  0x000056281e00e5e6 in handler::increment_statistics (this=0x7f9480114fd0, offset=&system_status_var::ha_read_rnd_next_count) at /data/src/10.3/sql/sql_class.h:6425
      #5  handler::ha_rnd_next (this=0x7f9480114fd0, buf=0x7f94801161d8 "\375\002") at /data/src/10.3/sql/handler.cc:2864
      #6  0x000056281e13db48 in rr_sequential (info=0x7f9480012ec8) at /data/src/10.3/sql/records.h:71
      #7  0x000056281de4c0eb in READ_RECORD::read_record (this=0x7f9480012ec8) at /data/src/10.3/sql/records.h:70
      #8  sub_select (end_of_records=false, join_tab=0x7f9480012e00, join=0x7f9480010948) at /data/src/10.3/sql/sql_select.cc:19733
      #9  sub_select (join=0x7f9480010948, join_tab=0x7f9480012e00, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19649
      #10 0x000056281de7627e in do_select (procedure=<optimized out>, join=0x7f9480010948) at /data/src/10.3/sql/sql_select.cc:19254
      #11 JOIN::exec_inner (this=this@entry=0x7f9480010948) at /data/src/10.3/sql/sql_select.cc:4116
      #12 0x000056281de764f7 in JOIN::exec (this=this@entry=0x7f9480010948) at /data/src/10.3/sql/sql_select.cc:3910
      #13 0x000056281de76642 in mysql_select (thd=0x7f9480000c48, tables=0x7f948000fff8, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2416184064, result=0x7f9480010850, unit=0x7f9480004950, select_lex=0x7f94800050d8) at /data/src/10.3/sql/sql_select.cc:4315
      #14 0x000056281de76f7b in handle_select (thd=thd@entry=0x7f9480000c48, lex=lex@entry=0x7f9480004890, result=result@entry=0x7f9480010850, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/src/10.3/sql/sql_select.cc:370
      #15 0x000056281deaea36 in Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x7f9480000c48) at /data/src/10.3/sql/sql_table.cc:11235
      #16 0x000056281de10a68 in mysql_execute_command (thd=0x7f9480000c48) at /data/src/10.3/sql/sql_parse.cc:6022
      #17 0x000056281de18063 in mysql_parse (thd=0x7f9480000c48, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:7810
      #18 0x000056281de1a44d in dispatch_command (command=COM_QUERY, thd=0x7f9480000c48, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_class.h:1137
      #19 0x000056281de1c3ed in do_command (thd=0x7f9480000c48) at /data/src/10.3/sql/sql_parse.cc:1393
      #20 0x000056281df02f26 in do_handle_one_connection (connect=connect@entry=0x56282063c978) at /data/src/10.3/sql/sql_connect.cc:1403
      #21 0x000056281df030ff in handle_one_connection (arg=arg@entry=0x56282063c978) at /data/src/10.3/sql/sql_connect.cc:1308
      #22 0x000056281e4d9786 in pfs_spawn_thread (arg=0x5628209113c8) at /data/src/10.3/storage/perfschema/pfs.cc:1869
      #23 0x00007f94d0896609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #24 0x00007f94d048b293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.3 d99f7872 debug

      mysqld: /data/src/10.3/sql/handler.cc:6364: int handler::ha_external_lock(THD*, int): Assertion `inited == NONE || table->open_by_handler' failed.
      201007 14:31:53 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fdcd3215f36 in __GI___assert_fail (assertion=0x559344fb54b0 "inited == NONE || table->open_by_handler", file=0x559344fb283e "/data/src/10.3/sql/handler.cc", line=6364, function=0x559344fb53a0 "int handler::ha_external_lock(THD*, int)") at assert.c:101
      #8  0x00005593444c5df0 in handler::ha_external_lock (this=0x7fdc700b8178, thd=0x7fdc70000d90, lock_type=2) at /data/src/10.3/sql/handler.cc:6364
      #9  0x00005593445f701e in unlock_external (thd=0x7fdc70000d90, table=0x7fdc70013bf0, count=1) at /data/src/10.3/sql/lock.cc:708
      #10 0x00005593445f63f6 in mysql_unlock_tables (thd=0x7fdc70000d90, sql_lock=0x7fdc70013bd0, free_lock=false) at /data/src/10.3/sql/lock.cc:429
      #11 0x00005593445f6349 in mysql_unlock_tables (thd=0x7fdc70000d90, sql_lock=0x7fdc70013bd0) at /data/src/10.3/sql/lock.cc:413
      #12 0x00005593440f1ea3 in close_thread_tables (thd=0x7fdc70000d90) at /data/src/10.3/sql/sql_base.cc:854
      #13 0x000055934419710e in mysql_execute_command (thd=0x7fdc70000d90) at /data/src/10.3/sql/sql_parse.cc:6107
      #14 0x00005593440ac566 in sp_instr_stmt::exec_core (this=0x7fdc700763f0, thd=0x7fdc70000d90, nextp=0x7fdccc3d0ddc) at /data/src/10.3/sql/sp_head.cc:3702
      #15 0x00005593440ab9e8 in sp_lex_keeper::reset_lex_and_exec_core (this=0x7fdc70076438, thd=0x7fdc70000d90, nextp=0x7fdccc3d0ddc, open_tables=false, instr=0x7fdc700763f0) at /data/src/10.3/sql/sp_head.cc:3434
      #16 0x00005593440ac12e in sp_instr_stmt::execute (this=0x7fdc700763f0, thd=0x7fdc70000d90, nextp=0x7fdccc3d0ddc) at /data/src/10.3/sql/sp_head.cc:3608
      #17 0x00005593440a59fa in sp_head::execute (this=0x7fdc70075508, thd=0x7fdc70000d90, merge_da_on_success=false) at /data/src/10.3/sql/sp_head.cc:1377
      #18 0x00005593440a6ecf in sp_head::execute_trigger (this=0x7fdc70075508, thd=0x7fdc70000d90, db_name=0x7fdc7003bd10, table_name=0x7fdc7003bd20, grant_info=0x7fdc70077638) at /data/src/10.3/sql/sp_head.cc:1873
      #19 0x0000559344288b2c in Table_triggers_list::process_triggers (this=0x7fdc7016a868, thd=0x7fdc70000d90, event=TRG_EVENT_INSERT, time_type=TRG_ACTION_AFTER, old_row_is_record1=true) at /data/src/10.3/sql/sql_trigger.cc:2222
      #20 0x000055934414e823 in write_record (thd=0x7fdc70000d90, table=0x7fdc70038910, info=0x7fdc70013c40) at /data/src/10.3/sql/sql_insert.cc:2053
      #21 0x0000559344153fb1 in select_insert::send_data (this=0x7fdc70013bf8, values=...) at /data/src/10.3/sql/sql_insert.cc:3936
      #22 0x000055934420c633 in end_send (join=0x7fdc70013cf0, join_tab=0x7fdc70016538, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:20894
      #23 0x0000559344209c7b in evaluate_join_record (join=0x7fdc70013cf0, join_tab=0x7fdc700161a8, error=0) at /data/src/10.3/sql/sql_select.cc:19934
      #24 0x0000559344209535 in sub_select (join=0x7fdc70013cf0, join_tab=0x7fdc700161a8, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19714
      #25 0x0000559344208a07 in do_select (join=0x7fdc70013cf0, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:19254
      #26 0x00005593441df8fb in JOIN::exec_inner (this=0x7fdc70013cf0) at /data/src/10.3/sql/sql_select.cc:4116
      #27 0x00005593441decba in JOIN::exec (this=0x7fdc70013cf0) at /data/src/10.3/sql/sql_select.cc:3910
      #28 0x00005593441dffd7 in mysql_select (thd=0x7fdc70000d90, tables=0x7fdc700133a0, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2416184064, result=0x7fdc70013bf8, unit=0x7fdc70004c58, select_lex=0x7fdc700053e0) at /data/src/10.3/sql/sql_select.cc:4315
      #29 0x00005593441d15fe in handle_select (thd=0x7fdc70000d90, lex=0x7fdc70004b98, result=0x7fdc70013bf8, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:370
      #30 0x000055934427f10c in Sql_cmd_create_table_like::execute (this=0x7fdc70012bc0, thd=0x7fdc70000d90) at /data/src/10.3/sql/sql_table.cc:11235
      #31 0x0000559344196a49 in mysql_execute_command (thd=0x7fdc70000d90) at /data/src/10.3/sql/sql_parse.cc:6022
      #32 0x000055934419c2ae in mysql_parse (thd=0x7fdc70000d90, rawbuf=0x7fdc70012ab8 "CREATE TABLE s ENGINE=MyISAM AS SELECT * FROM t1", length=48, parser_state=0x7fdccc3d25c0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7810
      #33 0x0000559344188a6f in dispatch_command (command=COM_QUERY, thd=0x7fdc70000d90, packet=0x7fdc70008f11 "CREATE TABLE s ENGINE=MyISAM AS SELECT * FROM t1", packet_length=48, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1847
      #34 0x000055934418740f in do_command (thd=0x7fdc70000d90) at /data/src/10.3/sql/sql_parse.cc:1393
      #35 0x0000559344304c24 in do_handle_one_connection (connect=0x55934765dbb0) at /data/src/10.3/sql/sql_connect.cc:1403
      #36 0x0000559344304980 in handle_one_connection (arg=0x55934765dbb0) at /data/src/10.3/sql/sql_connect.cc:1308
      #37 0x0000559344cca767 in pfs_spawn_thread (arg=0x5593478dc5d0) at /data/src/10.3/storage/perfschema/pfs.cc:1869
      #38 0x00007fdcd3727609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #39 0x00007fdcd3301293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Attachments

        Activity

          People

            monty Michael Widenius
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.