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

ALTER PARTITION BY SYSTEM_TIME after LOCK TABLES

    XMLWordPrintable

Details

    Description

      Assertion `bitmap_is_subset(&m_part_info->lock_partitions, &m_locked_partitions)' failed in ha_partition::start_stmt

      --source include/have_partition.inc
       
      CREATE OR REPLACE TABLE t1 (i INT) WITH SYSTEM VERSIONING;
      SET system_versioning_alter_history= KEEP;
      LOCK TABLE t1 WRITE;
      ALTER TABLE t1 PARTITION BY system_time INTERVAL 1 WEEK ( PARTITION p1 HISTORY, PARTITION pn CURRENT );
       
      # Cleanup
      DROP TABLE t1;
      

      bb-10.3-temporal ea49441c4163

      mysqld: /data/src/bb-10.3-temporal/sql/ha_partition.cc:4044: virtual int ha_partition::start_stmt(THD*, thr_lock_type): Assertion `bitmap_is_subset(&m_part_info->lock_partitions, &m_locked_partitions)' failed.
      171222 23:04:35 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f900b0a2ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x0000556605c0111d in ha_partition::start_stmt (this=0x7f8ff4083558, thd=0x7f8ff4000b00, lock_type=TL_READ) at /data/src/bb-10.3-temporal/sql/ha_partition.cc:4043
      #9  0x00005566050fbdca in check_lock_and_start_stmt (thd=0x7f8ff4000b00, prelocking_ctx=0x7f8ff40047d8, table_list=0x7f900530d088) at /data/src/bb-10.3-temporal/sql/sql_base.cc:4517
      #10 0x00005566050fd2e6 in lock_tables (thd=0x7f8ff4000b00, tables=0x7f900530d088, count=1, flags=0) at /data/src/bb-10.3-temporal/sql/sql_base.cc:5088
      #11 0x00005566052c0888 in Table_locker::lock (this=0x7f900530d060) at /data/src/bb-10.3-temporal/sql/partition_info.cc:1063
      #12 0x00005566052c0b59 in partition_info::vers_scan_min_max (this=0x7f8ff4084208, thd=0x7f8ff4000b00, part=0x7f8ff4084440) at /data/src/bb-10.3-temporal/sql/partition_info.cc:1095
      #13 0x00005566052b8f56 in partition_info::vers_setup_stats (this=0x7f8ff4084208, thd=0x7f8ff4000b00, is_create_table_ind=false) at /data/src/bb-10.3-temporal/sql/partition_info.cc:1281
      #14 0x000055660528d785 in open_table_from_share (thd=0x7f8ff4000b00, share=0x7f8ff4070070, alias=0x7f900530f0b0 "#sql-5ad4_4", db_stat=1, prgflag=8, ha_open_flags=4114, outparam=0x7f8ff4070e60, is_create_table=false) at /data/src/bb-10.3-temporal/sql/table.cc:3525
      #15 0x00005566053a0989 in THD::open_temporary_table (this=0x7f8ff4000b00, share=0x7f8ff4070070, alias=0x7f900530f0b0 "#sql-5ad4_4", open_in_engine=true) at /data/src/bb-10.3-temporal/sql/temporary_tables.cc:1112
      #16 0x000055660539e7ad in THD::create_and_open_tmp_table (this=0x7f8ff4000b00, hton=0x556608912130, frm=0x7f900530e230, path=0x7f900530f91c "./test/#sql-5ad4_4", db=0x7f8ff40153f0 "test", table_name=0x7f900530f0b0 "#sql-5ad4_4", open_in_engine=true) at /data/src/bb-10.3-temporal/sql/temporary_tables.cc:78
      #17 0x0000556605259ac0 in mysql_alter_table (thd=0x7f8ff4000b00, new_db=0x7f8ff40153f0 "test", new_name=0x0, create_info=0x7f900530fc90, table_list=0x7f8ff4014dc0, alter_info=0x7f900530fbe0, order_num=0, order=0x0, ignore=false) at /data/src/bb-10.3-temporal/sql/sql_table.cc:9770
      #18 0x00005566052e26a9 in Sql_cmd_alter_table::execute (this=0x7f8ff4015910, thd=0x7f8ff4000b00) at /data/src/bb-10.3-temporal/sql/sql_alter.cc:331
      #19 0x000055660518481a in mysql_execute_command (thd=0x7f8ff4000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:6261
      #20 0x0000556605189358 in mysql_parse (thd=0x7f8ff4000b00, rawbuf=0x7f8ff4014c48 "ALTER TABLE t1 PARTITION BY system_time INTERVAL 1 WEEK ( PARTITION p1 HISTORY, PARTITION pn CURRENT )", length=102, parser_state=0x7f90053115f0, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:7991
      #21 0x0000556605176af9 in dispatch_command (command=COM_QUERY, thd=0x7f8ff4000b00, packet=0x7f8ff411f161 "ALTER TABLE t1 PARTITION BY system_time INTERVAL 1 WEEK ( PARTITION p1 HISTORY, PARTITION pn CURRENT )", packet_length=102, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1825
      #22 0x000055660517552d in do_command (thd=0x7f8ff4000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1370
      #23 0x00005566052dd21e in do_handle_one_connection (connect=0x556608a9d300) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1420
      #24 0x00005566052dcfab in handle_one_connection (arg=0x556608a9d300) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1326
      #25 0x0000556605777bfe in pfs_spawn_thread (arg=0x556608ab86e0) at /data/src/bb-10.3-temporal/storage/perfschema/pfs.cc:1863
      #26 0x00007f900cd79494 in start_thread (arg=0x7f9005312700) at pthread_create.c:333
      #27 0x00007f900b15f93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Reproducible with (at least) MyISAM and InnoDB.

      Attachments

        Activity

          People

            midenok Aleksey Midenkov
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.