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

[Draft] Table corruption or assertion failure in row_upd_sec_index_entry with nopad collation

    XMLWordPrintable

Details

    Description

      Reproducible, needs cleaning.
      Note LOAD_FILE (should be run with --mysqld=--secure-file-priv= until converted into file-independent test case). Files from randgen d831012c29cddf19e038345ae7d82fe78d927b4a are suitable, they rarely change.

      --source include/have_innodb.inc
       
      CREATE DATABASE IF NOT EXISTS advanced_db;
      CREATE TABLE advanced_db.t5_InnoDB (id BIGINT, col_enum ENUM('','a','b','c','d','e','f','foo','bar') NOT NULL DEFAULT '' /*!100303 */, col_datetime DATETIME(4) NULL, col_int TINYINT(50) UNSIGNED NULL, col_blob MEDIUMTEXT NOT NULL DEFAULT '', col_varchar VARCHAR(548) NULL) ENGINE=InnoDB CHARACTER SET eucjpms COLLATE eucjpms_nopad_bin;
      ALTER TABLE advanced_db.t5_InnoDB ADD INDEX(col_blob(64) ASC,col_int ASC);
      INSERT IGNORE INTO advanced_db.t5_InnoDB (col_blob,col_datetime,col_enum,col_int,col_varchar,id) VALUES
       (SUBSTR(LOAD_FILE('/data/src/rqg/data/blobs/03.json'),372506,50769),'1900-01-01 00:00:00','',1,NULL,8),
       (SUBSTR(REPEAT(LOAD_FILE('/data/src/rqg/data/blobs/earth2kb.jpg'),10),182,22059),'1996-03-07 06:29:52.040078','',136,'pu',179),
       (SUBSTR(LOAD_FILE('/data/src/rqg/data/blobs/03.json'),372171,14919),'2011-07-08 00:00:00','',3,'vbwh',5),
       (SUBSTR(LOAD_FILE('/data/src/rqg/data/blobs/base64-1mb.txt'),162455,31125),'2025-05-14 00:00:00','',3,'',247),
       (SUBSTR(REPEAT(LOAD_FILE('/data/src/rqg/data/blobs/earth11k.jpg'),2),5,20492),'1994-03-11 15:25:26.024125','',4,'w',5),
       (SUBSTR(LOAD_FILE('/data/src/rqg/data/blobs/02.json'),15743,16620),'1900-01-01 00:00:00','',142,'p',7);
      UPDATE IGNORE advanced_db.t5_InnoDB SET col_blob = STR_TO_DATE(DATE_FORMAT(SEC_TO_TIME(5), CONCAT_WS(':', '%d', '%f')), CONCAT_WS(':', '%d', '%X', '%a')) WHERE col_int NOT BETWEEN CAST(col_enum AS TIME) AND TIME(col_int) OR id <= NULLIF(LOCALTIME(), LAST_DAY('0000-00-00 00:00:00'));
      

      10.4 87a5d16911bb94d383480fdd49e20876ed1400f2

      2024-01-13 16:15:24 9 [ERROR] InnoDB: Record in index `col_blob` of table `advanced_db`.`t5_InnoDB` was not found on update: TUPLE (info_bits=0, 3 fields): {[64]  JFIF     p p  ?? ?Photoshop 3.0 8BIM ? Print Info    x   P H H(0x00104A464946000101010070007000003F3F193F50686F746F73686F7020332E30003842494D033F0A5072696E7420496E666F00000000780100005000480048),[1] (0x04),[6]      (0x000000000204)} at: COMPACT RECORD(info_bits=0, 3 fields): {[0](0x),[1] (0x03),[6]      (0x000000000203)}
      mysqld: /data/bld/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.
      240113 16:15:24 [ERROR] mysqld got signal 6 ;
       
      #9  0x00007f5228453e32 in __GI___assert_fail (assertion=0x562bd0025aa0 "0", file=0x562bd002c760 "/data/bld/10.4-asan/storage/innobase/row/row0upd.cc", line=2455, function=0x562bd002e780 "dberr_t row_upd_sec_index_entry(upd_node_t*, que_thr_t*)") at ./assert/assert.c:101
      #10 0x0000562bcedd9c9e in row_upd_sec_index_entry (node=0x625000181410, thr=0x6250001817f0) at /data/bld/10.4-asan/storage/innobase/row/row0upd.cc:2455
      #11 0x0000562bceddac75 in row_upd_sec_step (node=0x625000181410, thr=0x6250001817f0) at /data/bld/10.4-asan/storage/innobase/row/row0upd.cc:2598
      #12 0x0000562bcede03da in row_upd (node=0x625000181410, thr=0x6250001817f0) at /data/bld/10.4-asan/storage/innobase/row/row0upd.cc:3384
      #13 0x0000562bcede0f09 in row_upd_step (thr=0x6250001817f0) at /data/bld/10.4-asan/storage/innobase/row/row0upd.cc:3499
      #14 0x0000562bced201bd in row_update_for_mysql (prebuilt=0x6210000bf588) at /data/bld/10.4-asan/storage/innobase/row/row0mysql.cc:1802
      #15 0x0000562bce9aeaff in ha_innobase::update_row (this=0x61d00025c6a8, old_row=0x61f000015738 "\360\005", new_row=0x61f0000150a8 "\360\005") at /data/bld/10.4-asan/storage/innobase/handler/ha_innodb.cc:8954
      #16 0x0000562bce025225 in handler::ha_update_row (this=0x61d00025c6a8, old_data=0x61f000015738 "\360\005", new_data=0x61f0000150a8 "\360\005") at /data/bld/10.4-asan/sql/handler.cc:6915
      #17 0x0000562bcdb201eb in mysql_update (thd=0x62b00009a208, table_list=0x62b0000a1560, fields=..., values=..., conds=0x62b0000a3ce0, order_num=0, order=0x0, limit=18446744073709551611, ignore=true, found_return=0x7f52124bd200, updated_return=0x7f52124bd220) at /data/bld/10.4-asan/sql/sql_update.cc:1087
      #18 0x0000562bcd84a842 in mysql_execute_command (thd=0x62b00009a208) at /data/bld/10.4-asan/sql/sql_parse.cc:4453
      #19 0x0000562bcd8639f3 in mysql_parse (thd=0x62b00009a208, rawbuf=0x62b0000a1228 "UPDATE IGNORE advanced_db.t5_InnoDB SET col_blob = STR_TO_DATE(DATE_FORMAT(SEC_TO_TIME(5), CONCAT_WS(':', '%d', '%f')), CONCAT_WS(':', '%d', '%X', '%a')) WHERE col_int NOT BETWEEN CAST(col_enum AS TIM"..., length=282, parser_state=0x7f52124bec60, is_com_multi=false, is_next_command=false) at /data/bld/10.4-asan/sql/sql_parse.cc:8062
      #20 0x0000562bcd839a4e in dispatch_command (command=COM_QUERY, thd=0x62b00009a208, packet=0x62900028f209 "UPDATE IGNORE advanced_db.t5_InnoDB SET col_blob = STR_TO_DATE(DATE_FORMAT(SEC_TO_TIME(5), CONCAT_WS(':', '%d', '%f')), CONCAT_WS(':', '%d', '%X', '%a')) WHERE col_int NOT BETWEEN CAST(col_enum AS TIM"..., packet_length=282, is_com_multi=false, is_next_command=false) at /data/bld/10.4-asan/sql/sql_parse.cc:1857
      #21 0x0000562bcd8365bd in do_command (thd=0x62b00009a208) at /data/bld/10.4-asan/sql/sql_parse.cc:1378
      #22 0x0000562bcdc3d135 in do_handle_one_connection (connect=0x608000000ba8) at /data/bld/10.4-asan/sql/sql_connect.cc:1419
      #23 0x0000562bcdc3ca4c in handle_one_connection (arg=0x608000000ba8) at /data/bld/10.4-asan/sql/sql_connect.cc:1323
      #24 0x0000562bce8a1992 in pfs_spawn_thread (arg=0x615000006208) at /data/bld/10.4-asan/storage/perfschema/pfs.cc:1869
      #25 0x00007f52284a8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #26 0x00007f522852861c 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:
              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.