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

LP:809245 - Second assertion `bit < (map)->n_bits' with partial_match_merge

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Even after the fix for 730604 , the assertion still occurs:

      mysqld: ../include/my_bitmap.h:125: void bitmap_set_bit(MY_BITMAP*, uint): Assertion `bit < (map)->n_bits' failed.

      #6 0x00000033b58296e6 in __assert_fail () from /lib64/libc.so.6
      #7 0x0000000000629cbf in bitmap_set_bit (map=0x6a86cb8, bit=1) at ../include/my_bitmap.h:125
      #8 0x000000000062db45 in subselect_rowid_merge_engine::init (this=0x6a86c20, non_null_key_parts=0x0, partial_match_key_parts=0x6a84798)
      at item_subselect.cc:5250
      #9 0x00000000006309ec in subselect_hash_sj_engine::exec (this=0x6a84710) at item_subselect.cc:4611
      #10 0x0000000000636f78 in Item_subselect::exec (this=0x6a2d400) at item_subselect.cc:556
      #11 0x00000000006370c0 in Item_in_subselect::exec (this=0x6a2d400) at item_subselect.cc:704
      #12 0x000000000062a9a1 in Item_in_subselect::val_bool (this=0x6a2d400) at item_subselect.cc:1412
      #13 0x00000000005ae4ec in Item::val_bool_result (this=0x6a2d400) at item.h:842
      #14 0x00000000005e7dba in Item_in_optimizer::val_int (this=0x6a2dbb8) at item_cmpfunc.cc:1654
      #15 0x00000000005ae470 in Item::val_int_result (this=0x6a2dbb8) at item.h:838
      #16 0x0000000000595206 in Item_cache_int::cache_value (this=0x6a863e8) at item.cc:8178
      #17 0x00000000005b0fcf in Item_cache_wrapper::cache (this=0x6a86348) at item.cc:7029
      #18 0x00000000005961b3 in Item_cache_wrapper::val_bool (this=0x6a86348) at item.cc:7193
      #19 0x00000000005e7fdc in Item_func_not::val_int (this=0x6a2d600) at item_cmpfunc.cc:308
      #20 0x0000000000752c01 in JOIN::exec (this=0x6a78190) at sql_select.cc:2113
      #21 0x000000000074ef24 in mysql_select (thd=0x696c068, rref_pointer_array=0x696ec18, tables=0x69f1f40, wild_num=1, fields=..., conds=0x6a2d600, og_num=0,
      order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0x6a2d768, unit=0x696e510, select_lex=0x696e9f8)
      at sql_select.cc:2893
      #22 0x00000000007552c6 in handle_select (thd=0x696c068, lex=0x696e470, result=0x6a2d768, setup_tables_done_option=0) at sql_select.cc:283
      #23 0x00000000006a1ed4 in execute_sqlcom_select (thd=0x696c068, all_tables=0x69f1f40) at sql_parse.cc:5087
      #24 0x00000000006a3bb2 in mysql_execute_command (thd=0x696c068) at sql_parse.cc:2231
      #25 0x00000000006ac94b in mysql_parse (thd=0x696c068,
      rawbuf=0x69f1cb0 "SELECT *\nFROM t1\nWHERE ( t1.d , t1.d ) NOT IN (\nSELECT t3.d , t2.c\nFROM t3\nLEFT JOIN t2 ON t3.a = t2.a\n)", length=106,
      found_semicolon=0x41a95f08) at sql_parse.cc:6088
      #26 0x00000000006ad7e3 in dispatch_command (command=COM_QUERY, thd=0x696c068,
      packet=0x69e8939 "SELECT *\nFROM t1\nWHERE ( t1.d , t1.d ) NOT IN (\nSELECT t3.d , t2.c\nFROM t3\nLEFT JOIN t2 ON t3.a = t2.a\n)", packet_length=106)
      at sql_parse.cc:1208
      #27 0x00000000006aedf1 in do_command (thd=0x696c068) at sql_parse.cc:906
      #28 0x0000000000699867 in handle_one_connection (arg=0x696c068) at sql_connect.cc:1178
      #29 0x00000033b600673d in start_thread () from /lib64/libpthread.so.0
      #30 0x00000033b58d40cd in clone () from /lib64/libc.so.6

      minimal optimizer_switch: materialization=on,partial_match_table_scan=off,in_to_exists=off

      full optimizer switch:

      index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=off,derived_merge=on,derived_with_keys=on,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=on,partial_match_table_scan=off,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on

      test case:

      SET SESSION optimizer_switch = 'materialization=on';
      SET SESSION optimizer_switch = 'partial_match_table_scan=off';
      SET SESSION optimizer_switch = 'in_to_exists=off';

      CREATE TABLE t1 (d varchar(32)) ;
      INSERT INTO t1 VALUES ('r');

      CREATE TABLE t2 ( a int, c varchar(32)) ;
      INSERT INTO t2 VALUES (5,'r');

      CREATE TABLE t3 ( a int NOT NULL , d varchar(32)) ;
      INSERT INTO t3 VALUES (10,'g');

      SELECT @@optimizer_switch;

      SELECT *
      FROM t1
      WHERE ( t1.d , t1.d ) NOT IN (
      SELECT t3.d , t2.c
      FROM t3
      LEFT JOIN t2 ON t3.a = t2.a
      );

      bzr version-info
      revision-id: <email address hidden>
      date: 2011-07-11 10:56:48 -0700
      build-date: 2011-07-12 13:30:18 +0300
      revno: 3100
      branch-nick: maria-5.3

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 809245

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 809245

              People

              • Assignee:
                timour Timour Katchaounov
                Reporter:
                philipstoev Philip Stoev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: