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

Assertion `bitmap_is_set(&m_part_info->read_partitions, m_part_spec.start_part)' failed in ha_partition::handle_ordered_index_scan

    XMLWordPrintable

Details

    Description

      --source include/have_partition.inc
       
      CREATE TABLE t1 (a INT PRIMARY KEY) PARTITION BY LIST(a) (PARTITION p1 VALUES IN (1,2));
      INSERT INTO t1 VALUES (1),(2);
      SELECT MAX(a) FROM t1 WHERE a > 4;
       
      # Cleanup
      DROP TABLE t1;
      

      10.2 fa6d710b

      mysqld: /data/src/10.2/sql/ha_partition.cc:6133: int ha_partition::handle_ordered_index_scan(uchar*, bool): Assertion `bitmap_is_set(&m_part_info->read_partitions, m_part_spec.start_part)' failed.
      201126  0:15:01 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f8d48ed8f36 in __GI___assert_fail (assertion=0x55d5474ae440 "bitmap_is_set(&m_part_info->read_partitions, m_part_spec.start_part)", file=0x55d5474ac100 "/data/src/10.2/sql/ha_partition.cc", line=6133, function=0x55d5474ae400 "int ha_partition::handle_ordered_index_scan(uchar*, bool)") at assert.c:101
      #8  0x000055d54713d710 in ha_partition::handle_ordered_index_scan (this=0x7f8d280a1258, buf=0x7f8d280068e0 "\377\004", reverse_order=false) at /data/src/10.2/sql/ha_partition.cc:6133
      #9  0x000055d54713c577 in ha_partition::common_first_last (this=0x7f8d280a1258, buf=0x7f8d280068e0 "\377\004") at /data/src/10.2/sql/ha_partition.cc:5615
      #10 0x000055d54713c4b1 in ha_partition::index_last (this=0x7f8d280a1258, buf=0x7f8d280068e0 "\377\004") at /data/src/10.2/sql/ha_partition.cc:5594
      #11 0x000055d546a27bb5 in handler::ha_index_last (this=0x7f8d280a1258, buf=0x7f8d280068e0 "\377\004") at /data/src/10.2/sql/handler.cc:2828
      #12 0x000055d546b9476b in get_index_max_value (table=0x7f8d280a0650, ref=0x7f8d3f00b570, range_fl=2) at /data/src/10.2/sql/opt_sum.cc:211
      #13 0x000055d546b94f10 in opt_sum_query (thd=0x7f8d28000d90, tables=..., all_fields=..., conds=0x7f8d28013238) at /data/src/10.2/sql/opt_sum.cc:403
      #14 0x000055d5467e0a4a in JOIN::optimize_inner (this=0x7f8d28013480) at /data/src/10.2/sql/sql_select.cc:1500
      #15 0x000055d5467df416 in JOIN::optimize (this=0x7f8d28013480) at /data/src/10.2/sql/sql_select.cc:1117
      #16 0x000055d5467e8954 in mysql_select (thd=0x7f8d28000d90, tables=0x7f8d28012a68, wild_num=0, fields=..., conds=0x7f8d28013238, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f8d28013460, unit=0x7f8d28004988, select_lex=0x7f8d280050c8) at /data/src/10.2/sql/sql_select.cc:3822
      #17 0x000055d5467dcb5e in handle_select (thd=0x7f8d28000d90, lex=0x7f8d280048c8, result=0x7f8d28013460, setup_tables_done_option=0) at /data/src/10.2/sql/sql_select.cc:361
      #18 0x000055d5467a74c5 in execute_sqlcom_select (thd=0x7f8d28000d90, all_tables=0x7f8d28012a68) at /data/src/10.2/sql/sql_parse.cc:6249
      #19 0x000055d54679de14 in mysql_execute_command (thd=0x7f8d28000d90) at /data/src/10.2/sql/sql_parse.cc:3558
      #20 0x000055d5467ab253 in mysql_parse (thd=0x7f8d28000d90, rawbuf=0x7f8d280126f8 "SELECT MAX(a) FROM t1 WHERE a > 4", length=33, parser_state=0x7f8d3f00d5f0, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7761
      #21 0x000055d5467994e8 in dispatch_command (command=COM_QUERY, thd=0x7f8d28000d90, packet=0x7f8d28008b51 "SELECT MAX(a) FROM t1 WHERE a > 4", packet_length=33, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1827
      #22 0x000055d546797fe3 in do_command (thd=0x7f8d28000d90) at /data/src/10.2/sql/sql_parse.cc:1381
      #23 0x000055d5468f2309 in do_handle_one_connection (connect=0x55d549ed78e0) at /data/src/10.2/sql/sql_connect.cc:1336
      #24 0x000055d5468f206e in handle_one_connection (arg=0x55d549ed78e0) at /data/src/10.2/sql/sql_connect.cc:1241
      #25 0x000055d547119a76 in pfs_spawn_thread (arg=0x55d549ebac70) at /data/src/10.2/storage/perfschema/pfs.cc:1869
      #26 0x00007f8d493e8609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #27 0x00007f8d48fc4293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Reproducible on 10.1+, including old releases, with at least MyISAM and InnoDB.
      No obvious problem on a non-debug build.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.