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

SIGSEGV in ha_partition::create_partitioning_metadata | ERROR 1507 (HY000): Error in list of partitions to DROP (optimized builds, 10.5 only)

    XMLWordPrintable

    Details

      Description

      USE test;
      CREATE TABLE t(a INT) PARTITION BY RANGE(a) SUBPARTITION BY HASH(a) (PARTITION p VALUES LESS THAN (5) (SUBPARTITION sp, SUBPARTITION sp1), PARTITION p1 VALUES LESS THAN MAXVALUE (SUBPARTITION sp2, SUBPARTITION sp3));
      ALTER TABLE t DROP PARTITION p;
      

      Leads to:

      10.5.4 701efbb25b738f0c971798c5234d4d66b9235e47

      Core was generated by `/test/MD030620-mariadb-10.5.4-linux-x86_64-opt/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      [Current thread is 1 (Thread 0x14dbe828f700 (LWP 2414969))]
      (gdb) bt
      (gdb) (gdb) #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x0000558657c1d647 in my_write_core (sig=sig@entry=11) at /test/10.5_opt/mysys/stacktrace.c:518
      #2  0x00005586575dff4a in handle_fatal_signal (sig=11) at /test/10.5_opt/sql/signal_handler.cc:330
      #3  <signal handler called>
      #4  0x000055865783b589 in ha_partition::create_partitioning_metadata (this=0x14dbc346e230, path=0x14dbe8289930 "./test/#sql-shadow-4-t", old_path=0x0, action_flag=CHF_CREATE_FLAG) at /test/10.5_opt/sql/ha_partition.cc:689
      #5  0x0000558657477ff1 in mysql_write_frm (lpt=lpt@entry=0x14dbe828a040, flags=flags@entry=1) at /test/10.5_opt/sql/sql_table.cc:1863
      #6  0x000055865773cbbd in fast_alter_partition_table (thd=thd@entry=0x14dbc3412018, table=table@entry=0x14dbc3520e18, alter_info=alter_info@entry=0x14dbe828d530, create_info=create_info@entry=0x14dbe828d600, table_list=0x14dbc3447118, db=db@entry=0x14dbe828ca30, table_name=0x14dbe828ca40) at /test/10.5_opt/sql/sql_partition.cc:7200
      #7  0x0000558657482937 in mysql_alter_table (thd=thd@entry=0x14dbc3412018, new_db=new_db@entry=0x14dbc3416718, new_name=new_name@entry=0x14dbc3416b20, create_info=create_info@entry=0x14dbe828d600, table_list=<optimized out>, table_list@entry=0x14dbc3447118, alter_info=alter_info@entry=0x14dbe828d530, order_num=0, order=0x0, ignore=false, if_exists=false) at /test/10.5_opt/sql/sql_table.cc:10217
      #8  0x00005586574de371 in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x14dbc3412018) at /test/10.5_opt/sql/sql_alter.cc:532
      #9  0x00005586573ea45f in mysql_execute_command (thd=thd@entry=0x14dbc3412018) at /test/10.5_opt/sql/sql_parse.cc:5950
      #10 0x00005586573f0f1c in mysql_parse (thd=0x14dbc3412018, rawbuf=<optimized out>, length=30, parser_state=0x14dbe828e4b0, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.5_opt/sql/sql_parse.cc:7992
      #11 0x00005586573e6235 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14dbc3412018, packet=packet@entry=0x14dbc343a019 "ALTER TABLE t DROP PARTITION p", packet_length=packet_length@entry=30, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_opt/sql/sql_parse.cc:1874
      #12 0x00005586573e4644 in do_command (thd=0x14dbc3412018) at /test/10.5_opt/sql/sql_parse.cc:1355
      #13 0x00005586574d97c1 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x14dbe5c329b8, put_in_cache=put_in_cache@entry=true) at /test/10.5_opt/sql/sql_connect.cc:1411
      #14 0x00005586574d9b24 in handle_one_connection (arg=arg@entry=0x14dbe5c329b8) at /test/10.5_opt/sql/sql_connect.cc:1313
      #15 0x000055865784617a in pfs_spawn_thread (arg=0x14dbe5c4b018) at /test/10.5_opt/storage/perfschema/pfs.cc:2201
      #16 0x000014dbe76b66db in start_thread (arg=0x14dbe828f700) at pthread_create.c:463
      #17 0x000014dbe6ab488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.5.4 (opt)

      Bug confirmed not present in:
      MariaDB: 10.1.46 (dbg), 10.1.46 (opt), 10.2.33 (dbg), 10.2.33 (opt), 10.3.24 (dbg), 10.3.24 (opt), 10.4.14 (dbg), 10.4.14 (opt), 10.5.4 (dbg)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

      MariaDB 10.4.14 (opt):

      10.4.14 ed1434df88270ebe70ae412b5b723920b6b4e0e8

      10.4.14>USE test;
      Database changed
      10.4.14>CREATE TABLE t(a INT) PARTITION BY RANGE(a) SUBPARTITION BY HASH(a) (PARTITION p VALUES LESS THAN (5) (SUBPARTITION sp, SUBPARTITION sp1), PARTITION p1 VALUES LESS THAN MAXVALUE (SUBPARTITION sp2, SUBPARTITION sp3));
      Query OK, 0 rows affected (0.085 sec)
      10.4.14>ALTER TABLE t DROP PARTITION p;
      Query OK, 0 rows affected (0.052 sec)
      Records: 0  Duplicates: 0  Warnings: 0
      

        Attachments

          Activity

            People

            Assignee:
            monty Michael Widenius
            Reporter:
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: