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

Failing assertion: node->pcur->rel_pos == BTR_PCUR_ON or ER_KEY_NOT_FOUND or Assertion `inited==NONE' failed in handler::ha_index_init

    XMLWordPrintable

    Details

      Description

      Before closing the issue, please check that test cases from comments are also fixed.

      --source include/have_partition.inc
       
      CREATE TABLE t1 (a INT, b INT, UNIQUE (b) USING HASH) PARTITION BY KEY (a) PARTITIONS 2;
      INSERT INTO t1 VALUES (1,10),(2,20);
      UPDATE t1 SET b = 30 LIMIT 1;
       
      # Cleanup
      DROP TABLE t1;
      

      10.5 dcc2eaeb debug

      mariadbd: /data/src/10.5/sql/handler.h:3291: int handler::ha_index_init(uint, bool): Assertion `inited==NONE' failed.
      200407 19:29:03 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fae300ba102 in __GI___assert_fail (assertion=0x561a7264a720 "inited==NONE", file=0x561a7264a6a0 "/data/src/10.5/sql/handler.h", line=3291, function=0x561a72658800 <handler::ha_index_init(unsigned int, bool)::__PRETTY_FUNCTION__> "int handler::ha_index_init(uint, bool)") at assert.c:101
      #8  0x0000561a70503d4e in handler::ha_index_init (this=0x61d0001e4728, idx=0, sorted=false) at /data/src/10.5/sql/handler.h:3291
      #9  0x0000561a70ea688e in handler::check_duplicate_long_entry_key (this=0x61d0001e4728, new_rec=0x619000089458 "\361\001", key_no=0) at /data/src/10.5/sql/handler.cc:6589
      #10 0x0000561a70ea853a in handler::check_duplicate_long_entries_update (this=0x61d0001e4728, new_rec=0x619000089458 "\361\001") at /data/src/10.5/sql/handler.cc:6721
      #11 0x0000561a70eab863 in handler::ha_update_row (this=0x61d0001e4728, old_data=0x619000089470 "\361\001", new_data=0x619000089458 "\361\001") at /data/src/10.5/sql/handler.cc:6995
      #12 0x0000561a7171cce8 in ha_partition::update_row (this=0x61d0001e3d28, old_data=0x619000089470 "\361\001", new_data=0x619000089458 "\361\001") at /data/src/10.5/sql/ha_partition.cc:4444
      #13 0x0000561a70eabb6d in handler::ha_update_row (this=0x61d0001e3d28, old_data=0x619000089470 "\361\001", new_data=0x619000089458 "\361\001") at /data/src/10.5/sql/handler.cc:7000
      #14 0x0000561a709a1e6c in mysql_update (thd=0x62b000069288, table_list=0x62b0000383c0, fields=..., values=..., conds=0x0, order_num=0, order=0x0, limit=1, ignore=false, found_return=0x7fae27759cd0, updated_return=0x7fae27759d10) at /data/src/10.5/sql/sql_update.cc:1055
      #15 0x0000561a706bb609 in mysql_execute_command (thd=0x62b000069288) at /data/src/10.5/sql/sql_parse.cc:4363
      #16 0x0000561a706d5125 in mysql_parse (thd=0x62b000069288, rawbuf=0x62b0000382a8 "UPDATE t1 SET b = 30 LIMIT 1", length=28, parser_state=0x7fae2775aa50, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:7953
      #17 0x0000561a706aaf15 in dispatch_command (command=COM_QUERY, thd=0x62b000069288, packet=0x629000249289 "UPDATE t1 SET b = 30 LIMIT 1", packet_length=28, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1839
      #18 0x0000561a706a794a in do_command (thd=0x62b000069288) at /data/src/10.5/sql/sql_parse.cc:1358
      #19 0x0000561a70ac6a8b in do_handle_one_connection (connect=0x61100001fd88, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1422
      #20 0x0000561a70ac6326 in handle_one_connection (arg=0x61100001fc48) at /data/src/10.5/sql/sql_connect.cc:1319
      #21 0x0000561a71764bc6 in pfs_spawn_thread (arg=0x616000009108) at /data/src/10.5/storage/perfschema/pfs.cc:2201
      #22 0x00007fae30934fa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
      #23 0x00007fae301834cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.5 dcc2eaeb non-debug

      query 'UPDATE t1 SET b = 30 LIMIT 1' failed: 1032: Can't find record in 't1'
      

      The failures started happening on 10.5 after this commit:

      commit 0515577d128318e1b62511846d88d0c56226168d
      Author: Sergei Golubchik
      Date:   Thu Mar 5 19:19:57 2020 +0100
       
          cleanup: prepare "update_handler" for WITHOUT OVERLAPS
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              serg Sergei Golubchik
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: