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

Server crashes in handler::ha_index_init upon adding index to RocksDB table

    XMLWordPrintable

Details

    Description

      --source include/have_rocksdb.inc
       
      CREATE TABLE t (f INT) ENGINE=RocksDB;
      ALTER TABLE t ADD INDEX(f);
       
      # Cleanup
      DROP TABLE t;
      

      11.2 67c0fd2a41034eae1ea04b81cace6a154783aedd

      #3  <signal handler called>
      #4  0x000056028047efc7 in handler::ha_index_init (this=0x7f00282256f0, idx=0, sorted=true) at /data/bld/11.2-debug/sql/handler.cc:3755
      #5  0x00007f006eedd703 in myrocks::ha_rocksdb::inplace_populate_sk (this=0x7f00282256f0, new_table_arg=0x7f006c3c6e60, indexes=std::__debug::unordered_set with 1 element = {...}) at /data/bld/11.2-debug/storage/rocksdb/ha_rocksdb.cc:12854
      #6  0x00007f006eedd1ae in myrocks::ha_rocksdb::inplace_alter_table (this=0x7f00282256f0, altered_table=0x7f006c3c6e60, ha_alter_info=0x7f006c3c6da0) at /data/bld/11.2-debug/storage/rocksdb/ha_rocksdb.cc:12745
      #7  0x00005602801a1551 in handler::ha_inplace_alter_table (this=0x7f00282256f0, altered_table=0x7f006c3c6e60, ha_alter_info=0x7f006c3c6da0) at /data/bld/11.2-debug/sql/handler.h:4903
      #8  0x000056028018e429 in mysql_inplace_alter_table (thd=0x7f0028000dc8, table_list=0x7f0028015938, table=0x7f0028224da8, altered_table=0x7f006c3c6e60, ha_alter_info=0x7f006c3c6da0, target_mdl_request=0x7f006c3c76d0, ddl_log_state=0x7f006c3c6d40, trigger_param=0x7f006c3c7270, alter_ctx=0x7f006c3c8310, partial_alter=@0x7f006c3c6c19: false, start_alter_id=@0x7f006c3c6c58: 0, if_exists=false) at /data/bld/11.2-debug/sql/sql_table.cc:7935
      #9  0x0000560280199594 in mysql_alter_table (thd=0x7f0028000dc8, new_db=0x7f0028005c00, new_name=0x7f0028006060, create_info=0x7f006c3c91e0, table_list=0x7f0028015938, recreate_info=0x7f006c3c9030, alter_info=0x7f006c3c9070, order_num=0, order=0x0, ignore=false, if_exists=false) at /data/bld/11.2-debug/sql/sql_table.cc:11359
      #10 0x000056028025bd50 in Sql_cmd_alter_table::execute (this=0x7f0028016120, thd=0x7f0028000dc8) at /data/bld/11.2-debug/sql/sql_alter.cc:701
      #11 0x000056028005daad in mysql_execute_command (thd=0x7f0028000dc8, is_called_from_prepared_stmt=false) at /data/bld/11.2-debug/sql/sql_parse.cc:5903
      #12 0x0000560280063cb9 in mysql_parse (thd=0x7f0028000dc8, rawbuf=0x7f0028015850 "ALTER TABLE t ADD INDEX(f)", length=26, parser_state=0x7f006c3ca370) at /data/bld/11.2-debug/sql/sql_parse.cc:7951
      #13 0x000056028005031b in dispatch_command (command=COM_QUERY, thd=0x7f0028000dc8, packet=0x7f002800bd59 "ALTER TABLE t ADD INDEX(f)", packet_length=26, blocking=true) at /data/bld/11.2-debug/sql/sql_parse.cc:1905
      #14 0x000056028004ec74 in do_command (thd=0x7f0028000dc8, blocking=true) at /data/bld/11.2-debug/sql/sql_parse.cc:1418
      #15 0x000056028024f6a7 in do_handle_one_connection (connect=0x560284c6b778, put_in_cache=true) at /data/bld/11.2-debug/sql/sql_connect.cc:1429
      #16 0x000056028024f428 in handle_one_connection (arg=0x560284cc0478) at /data/bld/11.2-debug/sql/sql_connect.cc:1341
      #17 0x00005602807aa090 in pfs_spawn_thread (arg=0x560284c6b2d8) at /data/bld/11.2-debug/storage/perfschema/pfs.cc:2201
      #18 0x00007f0074aa8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #19 0x00007f0074b2861c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      The failure started happening after this commit in 11.2:

      commit 6bd1cb0ea041932118de8e49c1b0e66548eefded
      Author:     Oleg Smirnov
      AuthorDate: Sun Sep 29 20:50:58 2024 +0700
      CommitDate: Wed Oct 23 17:55:00 2024 +0700
       
          MDEV-34880 Incorrect result for query with derived table having TEXT field
      

      Attachments

        Issue Links

          Activity

            People

              oleg.smirnov Oleg Smirnov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.