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

Assertion `strcmp(share->unique_file_name,filename) || share->last_version' failed in test_if_reopen upon SELECT from temporary table

    XMLWordPrintable

Details

    Description

      Note: The assertion failure is the same as in MDEV-16985, but there is no SHOW TABLE STATUS, no previously failed ALTER, the stack trace is different, and affected versions aren't the same; so I'm filing it separately.

      CREATE TEMPORARY TABLE t1 (a INT, b VARBINARY(8), c INT, KEY(a)) ENGINE=MyISAM;
      INSERT INTO t1 VALUES (1,'a',1),(2,'b',2),(3,'c',3),(4,'d',4),(5,'e',5),(6,'f',6);
      ALTER TABLE t1 ADD KEY (c);
      SELECT * FROM t1 WHERE a IS NULL OR c IS NULL;
      

      10.1 716161ea

      mysqld: /data/src/10.1/storage/myisam/mi_open.c:67: test_if_reopen: Assertion `strcmp(share->unique_file_name,filename) || share->last_version' failed.
      200217 14:28:19 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f817967df12 in __GI___assert_fail (assertion=0x55c923852098 "strcmp(share->unique_file_name,filename) || share->last_version", file=0x55c923852070 "/data/src/10.1/storage/myisam/mi_open.c", line=67, function=0x55c9238522f8 <__PRETTY_FUNCTION__.13726> "test_if_reopen") at assert.c:101
      #8  0x000055c92329166b in test_if_reopen (filename=0x7f817b2a7550 "/dev/shm/var_auto_lG40/tmp/mysqld.1/#sql173b_3_1.MYI") at /data/src/10.1/storage/myisam/mi_open.c:66
      #9  0x000055c923291884 in mi_open (name=0x7f8170a850e8 "/data/bld/10.1-debug-nightly/mysql-test/var/tmp/mysqld.1/#sql173b_3_1", mode=7, open_flags=66) at /data/src/10.1/storage/myisam/mi_open.c:122
      #10 0x000055c92326547f in ha_myisam::open (this=0x7f8170a90278, name=0x7f8170a850e8 "/data/bld/10.1-debug-nightly/mysql-test/var/tmp/mysqld.1/#sql173b_3_1", mode=7, test_if_locked=2) at /data/src/10.1/storage/myisam/ha_myisam.cc:754
      #11 0x000055c922fee68e in handler::ha_open (this=0x7f8170a90278, table_arg=0x7f8170a84070, name=0x7f8170a850e8 "/data/bld/10.1-debug-nightly/mysql-test/var/tmp/mysqld.1/#sql173b_3_1", mode=7, test_if_locked=2) at /data/src/10.1/sql/handler.cc:2569
      #12 0x000055c922fee170 in handler::clone (this=0x7f81708ac888, name=0x7f8170a850e8 "/data/bld/10.1-debug-nightly/mysql-test/var/tmp/mysqld.1/#sql173b_3_1", mem_root=0x7f81709a5188) at /data/src/10.1/sql/handler.cc:2480
      #13 0x000055c923265221 in ha_myisam::clone (this=0x7f81708ac888, name=0x7f8170a850e8 "/data/bld/10.1-debug-nightly/mysql-test/var/tmp/mysqld.1/#sql173b_3_1", mem_root=0x7f81709a5188) at /data/src/10.1/storage/myisam/ha_myisam.cc:680
      #14 0x000055c923107915 in QUICK_RANGE_SELECT::init_ror_merged_scan (this=0x7f8170a8b140, reuse_handler=false, local_alloc=0x7f81709a5188) at /data/src/10.1/sql/opt_range.cc:1500
      #15 0x000055c923108532 in QUICK_ROR_UNION_SELECT::reset (this=0x7f81709a5100) at /data/src/10.1/sql/opt_range.cc:1789
      #16 0x000055c922e10e71 in join_init_read_record (tab=0x7f81708f8d08) at /data/src/10.1/sql/sql_select.cc:19500
      #17 0x000055c922e0ede4 in sub_select (join=0x7f81708f6e00, join_tab=0x7f81708f8d08, end_of_records=false) at /data/src/10.1/sql/sql_select.cc:18590
      #18 0x000055c922e0e69b in do_select (join=0x7f81708f6e00, fields=0x7f81727cf3d8, table=0x0, procedure=0x0) at /data/src/10.1/sql/sql_select.cc:18248
      #19 0x000055c922de82a0 in JOIN::exec_inner (this=0x7f81708f6e00) at /data/src/10.1/sql/sql_select.cc:3277
      #20 0x000055c922de55cb in JOIN::exec (this=0x7f81708f6e00) at /data/src/10.1/sql/sql_select.cc:2564
      #21 0x000055c922de8ac1 in mysql_select (thd=0x7f81727cb070, rref_pointer_array=0x7f81727cf568, tables=0x7f81708f6298, wild_num=1, fields=..., conds=0x7f81708f6c28, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f81708f6de0, unit=0x7f81727cebb8, select_lex=0x7f81727cf2c0) at /data/src/10.1/sql/sql_select.cc:3501
      #22 0x000055c922dde230 in handle_select (thd=0x7f81727cb070, lex=0x7f81727ceaf8, result=0x7f81708f6de0, setup_tables_done_option=0) at /data/src/10.1/sql/sql_select.cc:377
      #23 0x000055c922dadae9 in execute_sqlcom_select (thd=0x7f81727cb070, all_tables=0x7f81708f6298) at /data/src/10.1/sql/sql_parse.cc:5691
      #24 0x000055c922da4929 in mysql_execute_command (thd=0x7f81727cb070) at /data/src/10.1/sql/sql_parse.cc:3038
      #25 0x000055c922db1761 in mysql_parse (thd=0x7f81727cb070, rawbuf=0x7f81708f6088 "SELECT * FROM t1 WHERE a IS NULL OR c IS NULL", length=45, parser_state=0x7f817b2aa1e0) at /data/src/10.1/sql/sql_parse.cc:7209
      #26 0x000055c922da093b in dispatch_command (command=COM_QUERY, thd=0x7f81727cb070, packet=0x7f81747ee071 "", packet_length=45) at /data/src/10.1/sql/sql_parse.cc:1499
      #27 0x000055c922d9f6f9 in do_command (thd=0x7f81727cb070) at /data/src/10.1/sql/sql_parse.cc:1131
      #28 0x000055c922edcae3 in do_handle_one_connection (thd_arg=0x7f81727cb070) at /data/src/10.1/sql/sql_connect.cc:1331
      #29 0x000055c922edc814 in handle_one_connection (arg=0x7f81727cb070) at /data/src/10.1/sql/sql_connect.cc:1242
      #30 0x000055c92330276e in pfs_spawn_thread (arg=0x7f8178c39c70) at /data/src/10.1/storage/perfschema/pfs.cc:1868
      #31 0x00007f817af2c4a4 in start_thread (arg=0x7f817b2ab700) at pthread_create.c:456
      #32 0x00007f817973ad0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Not reproducible with the provided test case on 10.2+.
      No obvious problem on a non-debug build.

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.