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

Server crashes in ha_partition::open upon update on partitioned HEAP table with WITHOUT OVERLAPS

    XMLWordPrintable

    Details

      Description

      --source include/have_partition.inc
       
      CREATE OR REPLACE TABLE t1 (id INT, s DATE, e DATE, PERIOD FOR p(s,e), PRIMARY KEY(id, p WITHOUT OVERLAPS)) ENGINE=HEAP PARTITION BY HASH(id);
      UPDATE t1 SET id = 1;
       
      # Cleanup
      DROP TABLE t1;
      

      10.5 b934a34c

      #3  <signal handler called>
      #4  0x000055ff910fc2f4 in ha_partition::open (this=0x7fe6300152d8, name=0x7fe630008158 "./test/t1#P#p0", mode=33, test_if_locked=2) at /data/src/10.5/sql/ha_partition.cc:3564
      #5  0x000055ff90da0a42 in handler::ha_open (this=0x7fe6300152d8, table_arg=0x7fe6300086a8, name=0x7fe630008158 "./test/t1#P#p0", mode=33, test_if_locked=2, mem_root=0x0, partitions_to_open=0x0) at /data/src/10.5/sql/handler.cc:2908
      #6  0x000055ff911d95be in ha_heap::clone (this=0x7fe630213610, name=0x7fe64039d4b0 "./test/t1#P#p0", mem_root=0x7fe6300065d8) at /data/src/10.5/storage/heap/ha_heap.cc:156
      #7  0x000055ff910fc9bb in ha_partition::open (this=0x7fe630014a48, name=0x7fe6301aca80 "./test/t1", mode=33, test_if_locked=1026) at /data/src/10.5/sql/ha_partition.cc:3644
      #8  0x000055ff90da0a42 in handler::ha_open (this=0x7fe630014a48, table_arg=0x7fe6300086a8, name=0x7fe6301aca80 "./test/t1", mode=33, test_if_locked=1026, mem_root=0x0, partitions_to_open=0x0) at /data/src/10.5/sql/handler.cc:2908
      #9  0x000055ff910fd11d in ha_partition::clone (this=0x7fe630009520, name=0x7fe6301aca80 "./test/t1", mem_root=0x7fe6300065d8) at /data/src/10.5/sql/ha_partition.cc:3840
      #10 0x000055ff90da00c9 in handler::create_lookup_handler (this=0x7fe630009520) at /data/src/10.5/sql/handler.cc:2791
      #11 0x000055ff90dae4f6 in handler::prepare_for_insert (this=0x7fe630009520, do_create=true) at /data/src/10.5/sql/handler.cc:6957
      #12 0x000055ff90b68e7e in mysql_update (thd=0x7fe630000b18, table_list=0x7fe630013a28, fields=..., values=..., conds=0x0, order_num=0, order=0x0, limit=18446744073709551615, ignore=false, found_return=0x7fe64039df80, updated_return=0x7fe64039e050) at /data/src/10.5/sql/sql_update.cc:974
      #13 0x000055ff90a48204 in mysql_execute_command (thd=0x7fe630000b18) at /data/src/10.5/sql/sql_parse.cc:4370
      #14 0x000055ff90a5449c in mysql_parse (thd=0x7fe630000b18, rawbuf=0x7fe630013950 "UPDATE t1 SET id = 1", length=20, parser_state=0x7fe64039e520, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:7957
      #15 0x000055ff90a407a4 in dispatch_command (command=COM_QUERY, thd=0x7fe630000b18, packet=0x7fe6301b0579 "UPDATE t1 SET id = 1", packet_length=20, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1840
      #16 0x000055ff90a3ef36 in do_command (thd=0x7fe630000b18) at /data/src/10.5/sql/sql_parse.cc:1359
      #17 0x000055ff90be255f in do_handle_one_connection (connect=0x55ff944e4758, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1411
      #18 0x000055ff90be22c7 in handle_one_connection (arg=0x55ff944e4758) at /data/src/10.5/sql/sql_connect.cc:1313
      #19 0x000055ff911183ee in pfs_spawn_thread (arg=0x55ff944f48e8) at /data/src/10.5/storage/perfschema/pfs.cc:2201
      #20 0x00007fe6477894a4 in start_thread (arg=0x7fe64039f700) at pthread_create.c:456
      #21 0x00007fe6458bdd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Reproducible on debug and non-debug builds alike.
      Doesn't crash with MyISAM, Aria, InnoDB.

        Attachments

          Activity

            People

            Assignee:
            nikitamalyavin Nikita Malyavin
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration