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

Server crashes in Item_func_nextval::update_table upon a mix of PURGE LOGS and sequences

    XMLWordPrintable

    Details

      Description

      PURGE MASTER LOGS BEFORE SETVAL(s,1);
      

      10.3 fd5c36be

      #3  <signal handler called>
      #4  0x0000557124294f32 in Item_func_nextval::update_table (this=0x7f81340130c0) at /data/src/10.3/sql/item_func.h:3153
      #5  0x0000557124290208 in Item_func_setval::val_int (this=0x7f81340130c0) at /data/src/10.3/sql/item_func.cc:6934
      #6  0x0000557124210876 in Item::get_date_from_int (this=0x7f81340130c0, ltime=0x7f8150959ba0, fuzzydate=8388608) at /data/src/10.3/sql/item.cc:1467
      #7  0x0000557123e578b1 in Item_int_func::get_date (this=0x7f81340130c0, ltime=0x7f8150959ba0, fuzzydate=8388608) at /data/src/10.3/sql/item_func.h:795
      #8  0x00005571240d10d0 in Temporal_with_date::make_from_item (this=0x7f8150959ba0, thd=0x7f8134000af0, item=0x7f81340130c0, flags=8388608) at /data/src/10.3/sql/sql_type.cc:176
      #9  0x0000557123dca244 in Temporal_with_date::Temporal_with_date (this=0x7f8150959ba0, thd=0x7f8134000af0, item=0x7f81340130c0, flags=8388608) at /data/src/10.3/sql/sql_type.h:306
      #10 0x0000557123dca342 in Datetime::Datetime (this=0x7f8150959ba0, thd=0x7f8134000af0, item=0x7f81340130c0, flags=8388608) at /data/src/10.3/sql/sql_type.h:381
      #11 0x000055712430137b in Item_func::get_arg0_date (this=0x7f81340131b8, ltime=0x7f8150959c20, fuzzy_date=8388608) at /data/src/10.3/sql/item_func.h:180
      #12 0x00005571242f9340 in Item_func_unix_timestamp::get_timestamp_value (this=0x7f81340131b8, seconds=0x7f8150959c78, second_part=0x7f8150959c70) at /data/src/10.3/sql/item_timefunc.cc:1212
      #13 0x00005571242f93d8 in Item_func_unix_timestamp::int_op (this=0x7f81340131b8) at /data/src/10.3/sql/item_timefunc.cc:1229
      #14 0x00005571240e54ab in Item_func_hybrid_field_type::val_int_from_int_op (this=0x7f81340131b8) at /data/src/10.3/sql/item_func.h:509
      #15 0x00005571240d8e18 in Type_handler_int_result::Item_func_hybrid_field_type_val_int (this=0x557125556960 <type_handler_longlong>, item=0x7f81340131b8) at /data/src/10.3/sql/sql_type.cc:3530
      #16 0x0000557123ec19cb in Item_func_hybrid_field_type::val_int (this=0x7f81340131b8) at /data/src/10.3/sql/item_func.h:573
      #17 0x0000557123edaa55 in mysql_execute_command (thd=0x7f8134000af0) at /data/src/10.3/sql/sql_parse.cc:3884
      #18 0x0000557123ee807b in mysql_parse (thd=0x7f8134000af0, rawbuf=0x7f8134012960 "PURGE MASTER LOGS BEFORE SETVAL(s,1)", length=36, parser_state=0x7f815095a5e0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7817
      #19 0x0000557123ed4c07 in dispatch_command (command=COM_QUERY, thd=0x7f8134000af0, packet=0x7f8134123291 "PURGE MASTER LOGS BEFORE SETVAL(s,1)", packet_length=36, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1856
      #20 0x0000557123ed354f in do_command (thd=0x7f8134000af0) at /data/src/10.3/sql/sql_parse.cc:1401
      #21 0x000055712404b0c8 in do_handle_one_connection (connect=0x5571268e6e10) at /data/src/10.3/sql/sql_connect.cc:1403
      #22 0x000055712404ae2a in handle_one_connection (arg=0x5571268e6e10) at /data/src/10.3/sql/sql_connect.cc:1308
      #23 0x00005571249fb368 in pfs_spawn_thread (arg=0x55712682df30) at /data/src/10.3/storage/perfschema/pfs.cc:1869
      #24 0x00007f81586e44a4 in start_thread (arg=0x7f815095b700) at pthread_create.c:456
      #25 0x00007f8156818d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Reproducible on 10.3-10.5, debug and non-debug builds alike.
      The sequence can exist or not, it doesn't make a difference.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:

                Git Integration