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

Assertion `next_free_value % real_increment == offset && next_free_value >= reserved_until' failed in sequence_definition::adjust_values upon SETVAL for sequence with INCREMENT 0

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.3
    • 10.3.7
    • Sequences
    • None

    Description

      CREATE SEQUENCE s INCREMENT 0;
      SELECT NEXTVAL(s);
      SELECT SETVAL(s, 10);
       
      # Cleanup
      DROP SEQUENCE s;
      

      10.3 560743198604

      #7  0x00007f590f9acee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055a29d18d889 in sequence_definition::adjust_values (this=0x7f58f8006a98, next_value=11) at /data/src/10.3/sql/sql_sequence.cc:563
      #9  0x000055a29d18e237 in SEQUENCE::set_value (this=0x7f58f8006a98, table=0x7f58f800e420, next_val=11, next_round=0, is_used=true) at /data/src/10.3/sql/sql_sequence.cc:843
      #10 0x000055a29d3053a5 in Item_func_setval::val_int (this=0x7f58f8015490) at /data/src/10.3/sql/item_func.cc:6926
      #11 0x000055a29d1754ad in Type_handler::Item_send_longlong (this=0x55a29e6fa350 <type_handler_longlong>, item=0x7f58f8015490, protocol=0x7f58f80010e8, buf=0x7f5909b519c0) at /data/src/10.3/sql/sql_type.cc:5302
      #12 0x000055a29d1797a8 in Type_handler_longlong::Item_send (this=0x55a29e6fa350 <type_handler_longlong>, item=0x7f58f8015490, protocol=0x7f58f80010e8, buf=0x7f5909b519c0) at /data/src/10.3/sql/sql_type.h:2232
      #13 0x000055a29ce8e9e0 in Item::send (this=0x7f58f8015490, protocol=0x7f58f80010e8, buffer=0x7f5909b519c0) at /data/src/10.3/sql/item.h:827
      #14 0x000055a29ce89d20 in Protocol::send_result_set_row (this=0x7f58f80010e8, row_items=0x7f58f80051e8) at /data/src/10.3/sql/protocol.cc:986
      #15 0x000055a29cf301a4 in select_send::send_data (this=0x7f58f8015680, items=...) at /data/src/10.3/sql/sql_class.cc:2997
      #16 0x000055a29cfda9d6 in JOIN::exec_inner (this=0x7f58f80156a0) at /data/src/10.3/sql/sql_select.cc:3828
      #17 0x000055a29cfda434 in JOIN::exec (this=0x7f58f80156a0) at /data/src/10.3/sql/sql_select.cc:3747
      #18 0x000055a29cfdb675 in mysql_select (thd=0x7f58f8000b00, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f58f8015680, unit=0x7f58f8004948, select_lex=0x7f58f80050c0) at /data/src/10.3/sql/sql_select.cc:4152
      #19 0x000055a29cfcdbcf in handle_select (thd=0x7f58f8000b00, lex=0x7f58f8004880, result=0x7f58f8015680, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:382
      #20 0x000055a29cf990c7 in execute_sqlcom_select (thd=0x7f58f8000b00, all_tables=0x7f58f8014e38) at /data/src/10.3/sql/sql_parse.cc:6539
      #21 0x000055a29cf8f828 in mysql_execute_command (thd=0x7f58f8000b00) at /data/src/10.3/sql/sql_parse.cc:3768
      #22 0x000055a29cf9cad8 in mysql_parse (thd=0x7f58f8000b00, rawbuf=0x7f58f8014d58 "SELECT SETVAL(s, 10)", length=20, parser_state=0x7f5909b535d0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8001
      #23 0x000055a29cf8a2bb in dispatch_command (command=COM_QUERY, thd=0x7f58f8000b00, packet=0x7f58f808ff81 "", packet_length=20, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1846
      #24 0x000055a29cf88cfa in do_command (thd=0x7f58f8000b00) at /data/src/10.3/sql/sql_parse.cc:1391
      #25 0x000055a29d0eb78b in do_handle_one_connection (connect=0x55a2a0ab4220) at /data/src/10.3/sql/sql_connect.cc:1402
      #26 0x000055a29d0eb518 in handle_one_connection (arg=0x55a2a0ab4220) at /data/src/10.3/sql/sql_connect.cc:1308
      #27 0x000055a29d56eb43 in pfs_spawn_thread (arg=0x55a2a0b76690) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #28 0x00007f5911683494 in start_thread (arg=0x7f5909b54700) at pthread_create.c:333
      #29 0x00007f590fa6993f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      No visible effect on a non-debug build.

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            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.