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

Error 169 "Record was not updated. New values were the same as original values" and corrupt index

    XMLWordPrintable

Details

    • Can result in unexpected behaviour

    Description

      Not being able to choose an existing bug report to which it can be added – we have lots of them both for unique hash keys and for versioning – I've decided to file it separately, for the sake of the error 169 which we don't seem to have in JIRA yet.

      --source include/have_innodb.inc
       
      CREATE TABLE t (id INT PRIMARY KEY, a INT, b INT, UNIQUE(b), UNIQUE(a)) ENGINE=InnoDB;
      ALTER TABLE t MODIFY b VARCHAR(4096) DEFAULT 'x';
      ALTER TABLE t ADD SYSTEM VERSIONING;
      INSERT INTO t (id) VALUES (1);
      REPLACE INTO t (id) VALUES (2);
      REPLACE INTO t (id) VALUES (3),(4);
      

      10.4 4cf3a1b1ad73c0ce9ceb7463f452dd65c8bf494d non-debug

      mysqltest: At line 8: query 'REPLACE INTO t (id) VALUES (3),(4)' failed: 1030: Got error 169 "Record was not updated. New values were the same as original values" from storage engine InnoDB
      

      2023-11-19 19:20:36 9 [ERROR] InnoDB: Record in index `b` of table `test`.`t` was not found on update: TUPLE (info_bits=0, 3 fields): {[8]    UF  (0x0000000055460003),[4]    (0x80000001),[7]eZC   .(0x655A43E40A882E)} at: COMPACT RECORD(info_bits=0, 3 fields): {[8]    N   (0x000000004EF316D7),[4]    (0x80000002),[7]     B?(0x7FFFFFFF0F423F)}
      2023-11-19 19:20:36 9 [Warning] InnoDB: Record in index `b` of table `test`.`t` was not found on rollback, trying to insert: TUPLE (info_bits=0, 3 fields): {[8]    UF  (0x0000000055460003),[4]    (0x80000001),[7]eZC   .(0x655A43E40A882E)} at: COMPACT RECORD(info_bits=0, 3 fields): {[8]    N   (0x000000004EF316D7),[4]    (0x80000002),[7]     B?(0x7FFFFFFF0F423F)}
      

      Debug builds produce assertion 0 failure, as usual.

      10.4 d4be70afb4eaffbd1c2dd3326e19752770b08bc6 debug

      2023-11-19 19:22:15 9 [ERROR] InnoDB: Record in index `b` of table `test`.`t` was not found on update: TUPLE (info_bits=0, 3 fields): {[8]      v (0x000000008F1676F7),[4]    (0x80000001),[7]eZDG   (0x655A44470BBEFB)} at: COMPACT RECORD(info_bits=0, 3 fields): {[8]    N   (0x000000004EF316D7),[4]    (0x80000002),[7]     B?(0x7FFFFFFF0F423F)}
      mysqld: /data/src/10.4-asan/storage/innobase/row/row0upd.cc:2455: dberr_t row_upd_sec_index_entry(upd_node_t*, que_thr_t*): Assertion `0' failed.
      231119 19:22:15 [ERROR] mysqld got signal 6 ;
       
      #9  0x00007f1a0bc53e32 in __GI___assert_fail (assertion=0x5565029b5aa0 "0", file=0x5565029bc760 "/data/src/10.4-asan/storage/innobase/row/row0upd.cc", line=2455, function=0x5565029be780 "dberr_t row_upd_sec_index_entry(upd_node_t*, que_thr_t*)") at ./assert/assert.c:101
      #10 0x000055650176af82 in row_upd_sec_index_entry (node=0x625000191460, thr=0x625000191840) at /data/src/10.4-asan/storage/innobase/row/row0upd.cc:2455
      #11 0x000055650176bf59 in row_upd_sec_step (node=0x625000191460, thr=0x625000191840) at /data/src/10.4-asan/storage/innobase/row/row0upd.cc:2598
      #12 0x0000556501771482 in row_upd (node=0x625000191460, thr=0x625000191840) at /data/src/10.4-asan/storage/innobase/row/row0upd.cc:3361
      #13 0x0000556501771fb1 in row_upd_step (thr=0x625000191840) at /data/src/10.4-asan/storage/innobase/row/row0upd.cc:3476
      #14 0x00005565016b14a1 in row_update_for_mysql (prebuilt=0x6210000d4988) at /data/src/10.4-asan/storage/innobase/row/row0mysql.cc:1802
      #15 0x00005565013406cf in ha_innobase::update_row (this=0x61d00026dea8, old_row=0x627000035950 "\001\001", new_row=0x627000034928 "\001\001") at /data/src/10.4-asan/storage/innobase/handler/ha_innodb.cc:8954
      #16 0x00005565009b7af7 in handler::ha_update_row (this=0x61d00026dea8, old_data=0x627000035950 "\001\001", new_data=0x627000034928 "\001\001") at /data/src/10.4-asan/sql/handler.cc:6915
      #17 0x000055650012867a in write_record (thd=0x62b00009a208, table=0x620000044088, info=0x7f19f7143a80) at /data/src/10.4-asan/sql/sql_insert.cc:2050
      #18 0x000055650012086b in mysql_insert (thd=0x62b00009a208, table_list=0x62b0000a1348, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_REPLACE, ignore=false) at /data/src/10.4-asan/sql/sql_insert.cc:1086
      #19 0x00005565001de80b in mysql_execute_command (thd=0x62b00009a208) at /data/src/10.4-asan/sql/sql_parse.cc:4615
      #20 0x00005565001f6881 in mysql_parse (thd=0x62b00009a208, rawbuf=0x62b0000a1228 "REPLACE INTO t (id) VALUES (3),(4)", length=34, parser_state=0x7f19f7145860, is_com_multi=false, is_next_command=false) at /data/src/10.4-asan/sql/sql_parse.cc:8014
      #21 0x00005565001cca76 in dispatch_command (command=COM_QUERY, thd=0x62b00009a208, packet=0x62900029e209 "REPLACE INTO t (id) VALUES (3),(4)", packet_length=34, is_com_multi=false, is_next_command=false) at /data/src/10.4-asan/sql/sql_parse.cc:1857
      #22 0x00005565001c95e5 in do_command (thd=0x62b00009a208) at /data/src/10.4-asan/sql/sql_parse.cc:1378
      #23 0x00005565005cfa01 in do_handle_one_connection (connect=0x608000000ba8) at /data/src/10.4-asan/sql/sql_connect.cc:1419
      #24 0x00005565005cf318 in handle_one_connection (arg=0x608000000ba8) at /data/src/10.4-asan/sql/sql_connect.cc:1323
      #25 0x0000556501233ed0 in pfs_spawn_thread (arg=0x615000006208) at /data/src/10.4-asan/storage/perfschema/pfs.cc:1869
      #26 0x00007f1a0bca8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #27 0x00007f1a0bd2861c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.