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

Assertion `prefix_size <= width' failed in Bitmap<width>::is_prefix(uint)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.5, 10.6
    • Fix Version/s: 10.5
    • Component/s: Server, Views
    • Labels:
      None

      Description

      CREATE TABLE t1 (
        f01 int, f02 int, f03 int, f04 int, f05 int, f06 int, f07 int, f08 int,
        f09 int, f10 int, f11 int, f12 int, f13 int, f14 int, f15 int, f16 int,
        f17 int, f18 int, f19 int, f20 int, f21 int, f22 int, f23 int, f24 int,
        f25 int, f26 int, f27 int, f28 int, f29 int, f30 int, f31 int, f32 int,
        f33 int, f34 int, f35 int, f36 int, f37 int, f38 int, f39 int, f40 int,
        f41 int, f42 int, f43 int, f44 int, f45 int, f46 int, f47 int, f48 int,
        f49 int, f50 int, f51 int, f52 int, f53 int, f54 int, f55 int, f56 int,
        f57 int, f58 int, f59 int, f60 int, f61 int, f62 int, f63 int, f64 int,
        f65 int);
       
      CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1;
      INSERT INTO t1 VALUES (),();
       
      SELECT * FROM v1 NATURAL JOIN t1;
       
      # Cleanup
      DROP VIEW v1;
      DROP TABLE t1;
      

      10.5 16388f39

      mariadbd: /data/src/10.5/sql/sql_bitmap.h:136: bool Bitmap<width>::is_prefix(uint) const [with unsigned int width = 64; uint = unsigned int]: Assertion `prefix_size <= width' failed.
      210220 17:05:10 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fe11d136f36 in __GI___assert_fail (assertion=0x55b6654a6a4d "prefix_size <= width", file=0x55b6654a6a68 "/data/src/10.5/sql/sql_bitmap.h", line=136, function=0x55b6654a6a88 "bool Bitmap<width>::is_prefix(uint) const [with unsigned int width = 64; uint = unsigned int]") at assert.c:101
      #8  0x000055b664761d66 in Bitmap<64u>::is_prefix (this=0x7fe1182f13b0, prefix_size=65) at /data/src/10.5/sql/sql_bitmap.h:136
      #9  0x000055b664713794 in make_join_statistics (join=0x7fe0fc0768b0, tables_list=..., keyuse_array=0x7fe0fc076ba0) at /data/src/10.5/sql/sql_select.cc:5283
      #10 0x000055b664708aa8 in JOIN::optimize_inner (this=0x7fe0fc0768b0) at /data/src/10.5/sql/sql_select.cc:2255
      #11 0x000055b664706595 in JOIN::optimize (this=0x7fe0fc0768b0) at /data/src/10.5/sql/sql_select.cc:1627
      #12 0x000055b6647119a8 in mysql_select (thd=0x7fe0fc000db8, tables=0x7fe0fc015960, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fe0fc070a58, unit=0x7fe0fc004f60, select_lex=0x7fe0fc015370) at /data/src/10.5/sql/sql_select.cc:4705
      #13 0x000055b6647014bf in handle_select (thd=0x7fe0fc000db8, lex=0x7fe0fc004e98, result=0x7fe0fc070a58, setup_tables_done_option=0) at /data/src/10.5/sql/sql_select.cc:417
      #14 0x000055b6646c3e83 in execute_sqlcom_select (thd=0x7fe0fc000db8, all_tables=0x7fe0fc015960) at /data/src/10.5/sql/sql_parse.cc:6282
      #15 0x000055b6646baf0d in mysql_execute_command (thd=0x7fe0fc000db8) at /data/src/10.5/sql/sql_parse.cc:3978
      #16 0x000055b6646c8d2a in mysql_parse (thd=0x7fe0fc000db8, rawbuf=0x7fe0fc0152d0 "SELECT * FROM v1 NATURAL JOIN t1", length=32, parser_state=0x7fe1182f2510, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:8063
      #17 0x000055b6646b4c8f in dispatch_command (command=COM_QUERY, thd=0x7fe0fc000db8, packet=0x7fe0fc00b589 "SELECT * FROM v1 NATURAL JOIN t1", packet_length=32, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1889
      #18 0x000055b6646b3483 in do_command (thd=0x7fe0fc000db8) at /data/src/10.5/sql/sql_parse.cc:1370
      #19 0x000055b664861689 in do_handle_one_connection (connect=0x55b667b28428, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1410
      #20 0x000055b6648613ec in handle_one_connection (arg=0x55b667a31e48) at /data/src/10.5/sql/sql_connect.cc:1312
      #21 0x000055b664dc1e35 in pfs_spawn_thread (arg=0x55b667b28068) at /data/src/10.5/storage/perfschema/pfs.cc:2201
      #22 0x00007fe11d64e609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #23 0x00007fe11d222293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Reproducible with at least MyISAM and InnoDB.
      No obvious problem on a non-debug build.
      Could not reproduce on 10.4.

        Attachments

          Activity

            People

            Assignee:
            sanja Oleksandr Byelkin
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration