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

Assertion `info->dfile.file == share->bitmap.file.file' failed in _ma_scan_init_block_record

    XMLWordPrintable

    Details

      Description

      USE test;
      SET SQL_MODE='';
      CREATE TABLE t1(pk INT PRIMARY KEY) ENGINE=Aria;
      SELECT * FROM t1 WHERE a IS NULL OR a > 0;
      CREATE TEMPORARY TABLE t3 (c1 INT NOT NULL) ENGINE=Aria;
      DELETE a3,a2 FROM t2 AS a1 INNER JOIN t3 AS a2, t3 AS a3;
      REPAIR TABLE t1, t2, t3;
      INSERT INTO t3 SELECT * FROM t3;
      

      Leads to:

      10.5.5 054f10365c49b70a3868edc0c955ffe187f8344c (Debug)

      mysqld: /test/10.5_dbg/storage/maria/ma_blockrec.c:5261: _ma_scan_init_block_record: Assertion `info->dfile.file == share->bitmap.file.file' failed.
      

      10.5.5 054f10365c49b70a3868edc0c955ffe187f8344c (Debug)

      Core was generated by `/test/MD200720-mariadb-10.5.5-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      [Current thread is 1 (Thread 0x1515fde06700 (LWP 3574415))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x000055fc1c42e82d in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
      #2  0x000055fc1bbe875c in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:330
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x00001515fc09c8b1 in __GI_abort () at abort.c:79
      #6  0x00001515fc08c42a in __assert_fail_base (fmt=0x1515fc213a38 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55fc1c7c03d8 "info->dfile.file == share->bitmap.file.file", file=file@entry=0x55fc1c7bf748 "/test/10.5_dbg/storage/maria/ma_blockrec.c", line=line@entry=5261, function=function@entry=0x55fc1c7c1cb0 <__PRETTY_FUNCTION__.20442> "_ma_scan_init_block_record") at assert.c:92
      #7  0x00001515fc08c4a2 in __GI___assert_fail (assertion=assertion@entry=0x55fc1c7c03d8 "info->dfile.file == share->bitmap.file.file", file=file@entry=0x55fc1c7bf748 "/test/10.5_dbg/storage/maria/ma_blockrec.c", line=line@entry=5261, function=function@entry=0x55fc1c7c1cb0 <__PRETTY_FUNCTION__.20442> "_ma_scan_init_block_record") at assert.c:101
      #8  0x000055fc1be94276 in _ma_scan_init_block_record (info=0x1515d9d4c088) at /test/10.5_dbg/storage/maria/ma_blockrec.c:5261
      #9  0x000055fc1be893f1 in maria_scan_init (info=0x1515d9d4c088) at /test/10.5_dbg/storage/maria/ma_scan.c:29
      #10 0x000055fc1be382af in ha_maria::rnd_init (this=<optimized out>, scan=<optimized out>) at /test/10.5_dbg/storage/maria/ha_maria.cc:2491
      #11 0x000055fc1bbf2ece in handler::ha_rnd_init (scan=true, this=0x1515d9d18ea0) at /test/10.5_dbg/sql/handler.h:3374
      #12 handler::read_first_row (this=0x1515d9d18ea0, buf=0x1515d9c57fa8 "\377", primary_key=64) at /test/10.5_dbg/sql/handler.cc:3301
      #13 0x000055fc1b98ed84 in handler::ha_read_first_row (primary_key=<optimized out>, buf=<optimized out>, this=0x1515d9d18ea0) at /test/10.5_dbg/sql/sql_class.h:6985
      #14 join_read_system (tab=tab@entry=0x1515d9c76770) at /test/10.5_dbg/sql/sql_select.cc:21179
      #15 0x000055fc1b99dad9 in join_read_const_table (thd=0x1515d9c15088, tab=tab@entry=0x1515d9c76770, pos=pos@entry=0x1515d9c76d20) at /test/10.5_dbg/sql/sql_select.cc:21073
      #16 0x000055fc1b9b78f4 in make_join_statistics (keyuse_array=0x1515d9c76168, tables_list=@0x1515d9c74aa0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1515d9c75da0, last = 0x1515d9c75da0, elements = 1}, <No data fields>}, join=0x1515d9c75e78) at /test/10.5_dbg/sql/sql_select.cc:5078
      #17 JOIN::optimize_inner (this=this@entry=0x1515d9c75e78) at /test/10.5_dbg/sql/sql_select.cc:2242
      #18 0x000055fc1b9b96ce in JOIN::optimize (this=this@entry=0x1515d9c75e78) at /test/10.5_dbg/sql/sql_select.cc:1618
      #19 0x000055fc1b9ba058 in mysql_select (thd=thd@entry=0x1515d9c15088, tables=<optimized out>, fields=@0x1515d9c749b0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1515d9c74e10, last = 0x1515d9c74e10, elements = 1}, <No data fields>}, conds=0x0, og_num=0, order=<optimized out>, group=0x0, having=0x0, proc_param=0x0, select_options=2202244745984, result=0x1515d9c75dc0, unit=0x1515d9c190a0, select_lex=0x1515d9c74860) at /test/10.5_dbg/sql/sql_select.cc:4641
      #20 0x000055fc1b9ba3d4 in handle_select (thd=thd@entry=0x1515d9c15088, lex=lex@entry=0x1515d9c18fd8, result=result@entry=0x1515d9c75dc0, setup_tables_done_option=setup_tables_done_option@entry=1073741824) at /test/10.5_dbg/sql/sql_select.cc:417
      #21 0x000055fc1b93dd53 in mysql_execute_command (thd=thd@entry=0x1515d9c15088) at /test/10.5_dbg/sql/sql_parse.cc:4691
      #22 0x000055fc1b948b8a in mysql_parse (thd=thd@entry=0x1515d9c15088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1515fde05350, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7993
      #23 0x000055fc1b93563c in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1515d9c15088, packet=packet@entry=0x1515d9c67089 "INSERT INTO t3 SELECT * FROM t3", packet_length=packet_length@entry=31, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1866
      #24 0x000055fc1b933e16 in do_command (thd=0x1515d9c15088) at /test/10.5_dbg/sql/sql_parse.cc:1347
      #25 0x000055fc1ba904af in do_handle_one_connection (connect=<optimized out>, connect@entry=0x1515dccc9808, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1411
      #26 0x000055fc1ba90bcb in handle_one_connection (arg=arg@entry=0x1515dccc9808) at /test/10.5_dbg/sql/sql_connect.cc:1313
      #27 0x000055fc1bef4dca in pfs_spawn_thread (arg=0x1515fac46508) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #28 0x00001515fcd7f6db in start_thread (arg=0x1515fde06700) at pthread_create.c:463
      #29 0x00001515fc17da3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.2.33 (dbg), 10.3.24 (dbg), 10.4.14 (dbg), 10.5.5 (dbg)

      Bug confirmed not present in:
      MariaDB: 10.1.46 (dbg), 10.1.46 (opt), 10.2.33 (opt), 10.3.24 (opt), 10.4.14 (opt), 10.5.5 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

        Attachments

          Activity

            People

            Assignee:
            vlad.lesin Vladislav Lesin
            Reporter:
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: