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

Assertion `!fully || (bool) hist_part' failed in Vers_part_info::initialized

    XMLWordPrintable

Details

    Description

      Note: this is a non-deterministic test case, don't put it into the regression suite, it's for initial reproducing only.

      Note: Procedure is not important for the test flow, it's there just to make a concurrent MTR test case. You can remove the procedure and simply run ALTER and SELECT in two connections, but the test will need to be run with high enough --repeat=N.

      --source include/have_partition.inc
       
      CREATE OR REPLACE TABLE t1 (f INT, KEY(f)) ENGINE=MyISAM WITH SYSTEM VERSIONING 
      PARTITION BY system_time INTERVAL 7 DAY ( 
        PARTITION p1 VERSIONING, 
        PARTITION pn AS OF CURRENT_TIMESTAMP 
      );
       
      --delimiter |
      CREATE OR REPLACE PROCEDURE pr()
      BEGIN
        DECLARE i INT DEFAULT 0;
        WHILE i < 100
        DO
          ALTER TABLE t1 PARTITION BY system_time INTERVAL 7 DAY ( PARTITION p1 VERSIONING, PARTITION pn AS OF CURRENT_TIMESTAMP );
          SET i= i+1;
        END WHILE;
      END |
      --delimiter ;
       
      --connect (con1,localhost,root,,test)
      SET versioning_alter_history=KEEP;
      --send CALL pr()
       
      --connection default
      --let $run= 100
      while ($run) 
      {
        SELECT f FROM t1 UNION SELECT f FROM t1;
        --dec $run
      }
       
      # Cleanup
       
      --connection con1
      --reap
      --disconnect con1
      --connection default
      DROP TABLE t1;
      DROP PROCEDURE pr;
      

      bb-10.3-temporal 2ae2876a6ce4b1

      mysqld: /data/src/bb-10.3-temporal/sql/partition_info.h:62: bool Vers_part_info::initialized(bool): Assertion `!fully || (bool) hist_part' failed.
      171217  0:54:48 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f5695fbaee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x00005592fe20336d in Vers_part_info::initialized (this=0x7f568003bcc0, fully=true) at /data/src/bb-10.3-temporal/sql/partition_info.h:62
      #9  0x00005592fe2034fa in partition_info::vers_hist_part (this=0x7f568003bda8) at /data/src/bb-10.3-temporal/sql/partition_info.h:429
      #10 0x00005592fe1fc7dd in partition_info::vers_setup_stats (this=0x7f568003bda8, thd=0x7f5680000b00, is_create_table_ind=false) at /data/src/bb-10.3-temporal/sql/partition_info.cc:1173
      #11 0x00005592fe1d126f in open_table_from_share (thd=0x7f5680000b00, share=0x7f568000c268, alias=0x7f5680014e58 "t1", db_stat=33, prgflag=8, ha_open_flags=18, outparam=0x7f56800391a0, is_create_table=false) at /data/src/bb-10.3-temporal/sql/table.cc:3495
      #12 0x00005592fe03ba39 in open_table (thd=0x7f5680000b00, table_list=0x7f5680014e60, ot_ctx=0x7f5690227c00) at /data/src/bb-10.3-temporal/sql/sql_base.cc:1907
      #13 0x00005592fe03e861 in open_and_process_table (thd=0x7f5680000b00, lex=0x7f56800047b8, tables=0x7f5680014e60, counter=0x7f5690227c94, flags=0, prelocking_strategy=0x7f5690227d10, has_prelocking_list=false, ot_ctx=0x7f5690227c00) at /data/src/bb-10.3-temporal/sql/sql_base.cc:3467
      #14 0x00005592fe03fa16 in open_tables (thd=0x7f5680000b00, options=..., start=0x7f5690227c78, counter=0x7f5690227c94, flags=0, prelocking_strategy=0x7f5690227d10) at /data/src/bb-10.3-temporal/sql/sql_base.cc:3987
      #15 0x00005592fe041328 in open_and_lock_tables (thd=0x7f5680000b00, options=..., tables=0x7f5680014e60, derived=true, flags=0, prelocking_strategy=0x7f5690227d10) at /data/src/bb-10.3-temporal/sql/sql_base.cc:4742
      #16 0x00005592fe033e87 in open_and_lock_tables (thd=0x7f5680000b00, tables=0x7f5680014e60, derived=true, flags=0) at /data/src/bb-10.3-temporal/sql/sql_base.h:496
      #17 0x00005592fe0ca2d3 in execute_sqlcom_select (thd=0x7f5680000b00, all_tables=0x7f5680014e60) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:6453
      #18 0x00005592fe0c0df6 in mysql_execute_command (thd=0x7f5680000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:3749
      #19 0x00005592fe0ce0e4 in mysql_parse (thd=0x7f5680000b00, rawbuf=0x7f5680014c48 "SELECT f FROM t1 UNION SELECT f FROM t1", length=39, parser_state=0x7f56902295f0, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:7988
      #20 0x00005592fe0bb8a7 in dispatch_command (command=COM_QUERY, thd=0x7f5680000b00, packet=0x7f568011ee21 "SELECT f FROM t1 UNION SELECT f FROM t1", packet_length=39, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1826
      #21 0x00005592fe0ba2db in do_command (thd=0x7f5680000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1371
      #22 0x00005592fe220ada in do_handle_one_connection (connect=0x5593004c8810) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1420
      #23 0x00005592fe220867 in handle_one_connection (arg=0x5593004c8810) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1326
      #24 0x00005592fe6b6cfc in pfs_spawn_thread (arg=0x5593004d0780) at /data/src/bb-10.3-temporal/storage/perfschema/pfs.cc:1863
      #25 0x00007f5697c91494 in start_thread (arg=0x7f569022a700) at pthread_create.c:333
      #26 0x00007f569607793f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Attachments

        Activity

          People

            midenok Aleksey Midenkov
            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.