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

assertion failure on missing InnoDB index

    Details

      Description

      Test case was borrowed from MySQL 5.7

      # Test an attempt to rename a nonexistent index inside InnoDB
      -- let $MYSQL_DATA_DIR = `SELECT @@datadir`
      CREATE TABLE t (a INT, INDEX i1 (a)) ENGINE=INNODB;
      -- copy_file $MYSQL_DATA_DIR/test/t.frm $MYSQL_DATA_DIR/test/t.fr_
      DROP TABLE t;
      CREATE TABLE t (a INT) ENGINE=INNODB;
      -- remove_file $MYSQL_DATA_DIR/test/t.frm
      -- move_file $MYSQL_DATA_DIR/test/t.fr_ $MYSQL_DATA_DIR/test/t.frm
      SHOW CREATE TABLE t;
      DROP TABLE t;
      

      #7  __GI___assert_fail (assertion=0x144708b "index", file=0x13d794a "/work/mariadb/storage/innobase/handler/ha_innodb.cc", line=9537, function=0x13d8c62 "dict_index_t *ha_innobase::innobase_get_index(uint)") at assert.c:101
      #8  ha_innobase::innobase_get_index (this=0x7fd5640f86d0, keynr=0) at ha_innodb.cc:9537
      #9  ha_innobase::info_low (this=0x7fd5640f86d0, flag=26, is_analyze=false) at ha_innodb.cc:14333
      #10 ha_innobase::info (this=0x7fd5640f86d0, flag=26) at ha_innodb.cc:14470
      #11 ha_innobase::open (this=0x7fd5640f86d0, name=0x7fd5640f5c38 "./test/t") at ha_innodb.cc:6535
      #12 handler::ha_open (this=0x7fd5640f86d0, table_arg=0x7fd5640f7b38, name=0x7fd5640f5c38 "./test/t", mode=2, test_if_locked=18) at handler.cc:2502
      #13 open_table_from_share (thd=0x7fd564000cf8, share=0x7fd5640f5720, alias=0x7fd564011898 "t", db_stat=33, prgflag=8, ha_open_flags=18, outparam=0x7fd5640f7b38, is_create_table=false) at table.cc:3345
      #14 open_table (thd=0x7fd564000cf8, table_list=0x7fd5640118a0, ot_ctx=0x7fd5b5d25b08) at sql_base.cc:1920
      #15 open_and_process_table (thd=0x7fd564000cf8, lex=0x7fd564004810, tables=0x7fd5640118a0, counter=0x7fd5b5d26078, flags=1024, prelocking_strategy=0x7fd5b5d25bc8, has_prelocking_list=false, ot_ctx=0x7fd5b5d25b08) at sql_base.cc:3488
      #16 open_tables (thd=0x7fd564000cf8, options=..., start=0x7fd5b5d260c8, counter=0x7fd5b5d26078, flags=1024, prelocking_strategy=0x7fd5b5d25bc8) at sql_base.cc:4009
      #17 open_tables (thd=0x7fd564000cf8, tables=0x7fd5b5d260c8, counter=0x7fd5b5d26078, flags=1024) at sql_base.h:474
      #18 mysqld_show_create_get_fields (thd=0x7fd564000cf8, table_list=0x7fd5640118a0, field_list=0x7fd5b5d26208, buffer=0x7fd5b5d26220) at sql_show.cc:1228
      #19 mysqld_show_create (thd=0x7fd564000cf8, table_list=0x7fd5640118a0) at sql_show.cc:1324
      #20 mysql_execute_command (thd=0x7fd564000cf8) at sql_parse.cc:4245
      #21 mysql_parse (thd=0x7fd564000cf8, rawbuf=0x7fd5640117c0 "SHOW CREATE TABLE t", length=19, parser_state=0x7fd5b5d29570, is_com_multi=false, is_next_command=false) at sql_parse.cc:8015
      
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kevg Eugene Kosov
                Reporter:
                kevg Eugene Kosov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: