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

Assertion `!(((trx))->auto_commit && ((trx))->will_lock == 0)' failed in lock_table_create upon reading from locked InnoDB sequence

    XMLWordPrintable

Details

    Description

      Note: the scenario is very similar to MDEV-13015, so it might be a duplicate; but the assertion failure is different, so I'm filing it just in case.

      --source include/have_innodb.inc
       
      create sequence s1 engine=InnoDB;
      --source include/restart_mysqld.inc
      lock table s1 read;
      select * from s1;
       
      # cleanup
      unlock tables;
      drop sequence s1;
      

      10.3 86b94170352

      mysqld: /data/src/10.3/storage/innobase/lock/lock0lock.cc:4342: ib_lock_t* lock_table_create(ib_lock_t*, dict_table_t*, ulint, trx_t*): Assertion `!(((trx))->auto_commit && ((trx))->will_lock == 0)' failed.
      170607  3:01:57 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fbe91878ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055aafe999252 in lock_table_create (c_lock=0x0, table=0x7fbe3813b8d8, type_mode=0, trx=0x7fbe873fe8c8) at /data/src/10.3/storage/innobase/lock/lock0lock.cc:4342
      #9  0x000055aafe999a79 in lock_table_create (table=0x7fbe3813b8d8, type_mode=0, trx=0x7fbe873fe8c8) at /data/src/10.3/storage/innobase/lock/lock0lock.cc:4453
      #10 0x000055aafe99a8bf in lock_table (flags=0, table=0x7fbe3813b8d8, mode=LOCK_IS, thr=0x7fbe3813e120) at /data/src/10.3/storage/innobase/lock/lock0lock.cc:4798
      #11 0x000055aafea94a4b in row_search_mvcc (buf=0x7fbe38136c38 "\377", '\245' <repeats 63 times>, "\377", '\245' <repeats 63 times>, mode=PAGE_CUR_G, prebuilt=0x7fbe3813d8e8, match_mode=0, direction=0) at /data/src/10.3/storage/innobase/row/row0sel.cc:4555
      #12 0x000055aafe921f27 in ha_innobase::index_read (this=0x7fbe38142118, buf=0x7fbe38136c38 "\377", '\245' <repeats 63 times>, "\377", '\245' <repeats 63 times>, key_ptr=0x0, key_len=0, find_flag=HA_READ_AFTER_KEY) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:9837
      #13 0x000055aafe9232ca in ha_innobase::index_first (this=0x7fbe38142118, buf=0x7fbe38136c38 "\377", '\245' <repeats 63 times>, "\377", '\245' <repeats 63 times>) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:10275
      #14 0x000055aafe92354a in ha_innobase::rnd_next (this=0x7fbe38142118, buf=0x7fbe38136c38 "\377", '\245' <repeats 63 times>, "\377", '\245' <repeats 63 times>) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:10371
      #15 0x000055aafed4180b in ha_sequence::rnd_next (this=0x7fbe38136758, buf=0x7fbe38136c38 "\377", '\245' <repeats 63 times>, "\377", '\245' <repeats 63 times>) at /data/src/10.3/sql/ha_sequence.h:111
      #16 0x000055aafe60ed1d in handler::ha_rnd_next (this=0x7fbe38136758, buf=0x7fbe38136c38 "\377", '\245' <repeats 63 times>, "\377", '\245' <repeats 63 times>) at /data/src/10.3/sql/handler.cc:2594
      #17 0x000055aafe610497 in handler::read_first_row (this=0x7fbe38136758, buf=0x7fbe38136c38 "\377", '\245' <repeats 63 times>, "\377", '\245' <repeats 63 times>, primary_key=64) at /data/src/10.3/sql/handler.cc:2831
      #18 0x000055aafe3e1967 in handler::ha_read_first_row (this=0x7fbe38136758, buf=0x7fbe38136c38 "\377", '\245' <repeats 63 times>, "\377", '\245' <repeats 63 times>, primary_key=64) at /data/src/10.3/sql/sql_class.h:5849
      #19 0x000055aafe3cabfb in join_read_system (tab=0x7fbe380162c8) at /data/src/10.3/sql/sql_select.cc:18991
      #20 0x000055aafe3ca7bc in join_read_const_table (thd=0x7fbe38000b00, tab=0x7fbe380162c8, pos=0x7fbe38016880) at /data/src/10.3/sql/sql_select.cc:18887
      #21 0x000055aafe3a510a in make_join_statistics (join=0x7fbe38015228, tables_list=..., keyuse_array=0x7fbe38015510) at /data/src/10.3/sql/sql_select.cc:3999
      #22 0x000055aafe39c7ce in JOIN::optimize_inner (this=0x7fbe38015228) at /data/src/10.3/sql/sql_select.cc:1508
      #23 0x000055aafe39afef in JOIN::optimize (this=0x7fbe38015228) at /data/src/10.3/sql/sql_select.cc:1085
      #24 0x000055aafe3a3ee0 in mysql_select (thd=0x7fbe38000b00, tables=0x7fbe38014b50, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2149845760, result=0x7fbe38015208, unit=0x7fbe38004698, select_lex=0x7fbe38004dd8) at /data/src/10.3/sql/sql_select.cc:3659
      #25 0x000055aafe398914 in handle_select (thd=0x7fbe38000b00, lex=0x7fbe380045d0, result=0x7fbe38015208, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:373
      #26 0x000055aafe364e0e in execute_sqlcom_select (thd=0x7fbe38000b00, all_tables=0x7fbe38014b50) at /data/src/10.3/sql/sql_parse.cc:6465
      #27 0x000055aafe35b19c in mysql_execute_command (thd=0x7fbe38000b00) at /data/src/10.3/sql/sql_parse.cc:3581
      #28 0x000055aafe368860 in mysql_parse (thd=0x7fbe38000b00, rawbuf=0x7fbe38014968 "select * from s1", length=16, parser_state=0x7fbe8c123200, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7927
      #29 0x000055aafe356518 in dispatch_command (command=COM_QUERY, thd=0x7fbe38000b00, packet=0x7fbe3800add1 "select * from s1", packet_length=16, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1817
      #30 0x000055aafe354ec1 in do_command (thd=0x7fbe38000b00) at /data/src/10.3/sql/sql_parse.cc:1380
      #31 0x000055aafe4a23f4 in do_handle_one_connection (connect=0x55ab01a4bd70) at /data/src/10.3/sql/sql_connect.cc:1354
      #32 0x000055aafe4a2181 in handle_one_connection (arg=0x55ab01a4bd70) at /data/src/10.3/sql/sql_connect.cc:1260
      #33 0x000055aafe8fea8d in pfs_spawn_thread (arg=0x55ab01a54610) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #34 0x00007fbe935b2494 in start_thread (arg=0x7fbe8c124700) at pthread_create.c:333
      #35 0x00007fbe9193593f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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