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

Server crashes in SEQUENCE::write_lock or Assertion `table && table->s->sequence' failed in Item_func_nextval::val_int

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.3
    • 10.3.3
    • Sequences
    • None

    Description

      CREATE TEMPORARY TABLE tmp (i INT);
      SELECT NEXT VALUE FOR tmp;
      

      10.3 debug 016c35a7f2f4a28

      mysqld: /data/src/10.3/sql/item_func.cc:6784: virtual longlong Item_func_nextval::val_int(): Assertion `table && table->s->sequence' failed.
      170903 16:59:57 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f241163bee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x00005576eb7cc132 in Item_func_nextval::val_int (this=0x7f23f0015100) at /data/src/10.3/sql/item_func.cc:6784
      #9  0x00005576eb652a63 in Type_handler::Item_send_longlong (this=0x5576ecb546b0 <type_handler_longlong>, item=0x7f23f0015100, protocol=0x7f23f0001098, buf=0x7f240c0d1a50) at /data/src/10.3/sql/sql_type.cc:5121
      #10 0x00005576eb6565c0 in Type_handler_longlong::Item_send (this=0x5576ecb546b0 <type_handler_longlong>, item=0x7f23f0015100, protocol=0x7f23f0001098, buf=0x7f240c0d1a50) at /data/src/10.3/sql/sql_type.h:1851
      #11 0x00005576eb3a9b88 in Item::send (this=0x7f23f0015100, protocol=0x7f23f0001098, buffer=0x7f240c0d1a50) at /data/src/10.3/sql/item.h:724
      #12 0x00005576eb3a54ca in Protocol::send_result_set_row (this=0x7f23f0001098, row_items=0x7f23f0005028) at /data/src/10.3/sql/protocol.cc:985
      #13 0x00005576eb42bbe6 in select_send::send_data (this=0x7f23f00152c0, items=...) at /data/src/10.3/sql/sql_class.cc:2847
      #14 0x00005576eb4c8bf2 in JOIN::exec_inner (this=0x7f23f00152e0) at /data/src/10.3/sql/sql_select.cc:3418
      #15 0x00005576eb4c863e in JOIN::exec (this=0x7f23f00152e0) at /data/src/10.3/sql/sql_select.cc:3337
      #16 0x00005576eb4c9831 in mysql_select (thd=0x7f23f0000b00, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f23f00152c0, unit=0x7f23f00047c0, select_lex=0x7f23f0004f00) at /data/src/10.3/sql/sql_select.cc:3737
      #17 0x00005576eb4bddbc in handle_select (thd=0x7f23f0000b00, lex=0x7f23f00046f8, result=0x7f23f00152c0, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:378
      #18 0x00005576eb48926e in execute_sqlcom_select (thd=0x7f23f0000b00, all_tables=0x7f23f0014ae8) at /data/src/10.3/sql/sql_parse.cc:6466
      #19 0x00005576eb47f7ef in mysql_execute_command (thd=0x7f23f0000b00) at /data/src/10.3/sql/sql_parse.cc:3731
      #20 0x00005576eb48cbd4 in mysql_parse (thd=0x7f23f0000b00, rawbuf=0x7f23f0014a08 "SELECT NEXT VALUE FOR tmp", length=25, parser_state=0x7f240c0d3610, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7921
      #21 0x00005576eb47a32e in dispatch_command (command=COM_QUERY, thd=0x7f23f0000b00, packet=0x7f23f0149c51 "", packet_length=25, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1819
      #22 0x00005576eb478d90 in do_command (thd=0x7f23f0000b00) at /data/src/10.3/sql/sql_parse.cc:1370
      #23 0x00005576eb5cf646 in do_handle_one_connection (connect=0x5576edc78260) at /data/src/10.3/sql/sql_connect.cc:1418
      #24 0x00005576eb5cf3d3 in handle_one_connection (arg=0x5576edc78260) at /data/src/10.3/sql/sql_connect.cc:1324
      #25 0x00005576eba471dc in pfs_spawn_thread (arg=0x5576edd11240) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #26 0x00007f2413580494 in start_thread (arg=0x7f240c0d4700) at pthread_create.c:333
      #27 0x00007f24116f893f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      10.3 non-debug 016c35a7f2f4a28

      #2  <signal handler called>
      #3  inline_mysql_rwlock_wrlock (src_file=0x564a905cb560 "/data/src/10.3/sql/sql_sequence.cc", src_line=369, that=0x60) at /data/src/10.3/include/mysql/psi/mysql_thread.h:915
      #4  SEQUENCE::write_lock (this=0x0, table=0x7f3d100937b8) at /data/src/10.3/sql/sql_sequence.cc:369
      #5  0x0000564a8ffefa99 in SEQUENCE::next_value (this=0x0, table=0x7f3d100937b8, second_round=<optimized out>, error=0x7f3d2e2da494) at /data/src/10.3/sql/sql_sequence.cc:657
      #6  0x0000564a900d28a6 in Item_func_nextval::val_int (this=0x7f3d10011a28) at /data/src/10.3/sql/item_func.cc:6820
      #7  0x0000564a8ffe5b18 in Type_handler::Item_send_longlong (this=<optimized out>, item=0x7f3d10011a28, protocol=0x7f3d10000eb8, buf=<optimized out>) at /data/src/10.3/sql/sql_type.cc:5121
      #8  0x0000564a8fe32996 in Protocol::send_result_set_row (this=this@entry=0x7f3d10000eb8, row_items=row_items@entry=0x7f3d10004d10) at /data/src/10.3/sql/protocol.cc:985
      #9  0x0000564a8fe8806b in select_send::send_data (this=0x7f3d10011be8, items=...) at /data/src/10.3/sql/sql_class.cc:2847
      #10 0x0000564a8ff12462 in JOIN::exec_inner (this=this@entry=0x7f3d10011c08) at /data/src/10.3/sql/sql_select.cc:3418
      #11 0x0000564a8ff126b9 in JOIN::exec (this=this@entry=0x7f3d10011c08) at /data/src/10.3/sql/sql_select.cc:3337
      #12 0x0000564a8ff127fb in mysql_select (thd=thd@entry=0x7f3d100009a8, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f3d10011be8, unit=0x7f3d100044a8, select_lex=0x7f3d10004be8) at /data/src/10.3/sql/sql_select.cc:3737
      #13 0x0000564a8ff13210 in handle_select (thd=thd@entry=0x7f3d100009a8, lex=lex@entry=0x7f3d100043e0, result=result@entry=0x7f3d10011be8, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/src/10.3/sql/sql_select.cc:378
      #14 0x0000564a8fdfa2eb in execute_sqlcom_select (thd=0x7f3d100009a8, all_tables=0x7f3d10011410) at /data/src/10.3/sql/sql_parse.cc:6466
      #15 0x0000564a8fec016c in mysql_execute_command (thd=0x7f3d100009a8) at /data/src/10.3/sql/sql_parse.cc:3731
      #16 0x0000564a8fec2bca in mysql_parse (thd=0x7f3d100009a8, 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:7921
      #17 0x0000564a8fec6738 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f3d100009a8, packet=packet@entry=0x7f3d10008fc9 "", packet_length=packet_length@entry=25, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.3/sql/sql_parse.cc:1819
      #18 0x0000564a8fec6e3f in do_command (thd=0x7f3d100009a8) at /data/src/10.3/sql/sql_parse.cc:1370
      #19 0x0000564a8ff90724 in do_handle_one_connection (connect=connect@entry=0x564a93747198) at /data/src/10.3/sql/sql_connect.cc:1418
      #20 0x0000564a8ff908c4 in handle_one_connection (arg=arg@entry=0x564a93747198) at /data/src/10.3/sql/sql_connect.cc:1324
      #21 0x0000564a90275134 in pfs_spawn_thread (arg=0x564a9376d428) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #22 0x00007f3d35e8b494 in start_thread (arg=0x7f3d2e2dd700) at pthread_create.c:333
      #23 0x00007f3d3400393f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.