[MDEV-22986] [ERROR] InnoDB: Record in index was not found on update in mysqld.log on slave Created: 2020-06-23 Updated: 2023-03-06 Resolved: 2023-03-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.2.31, 10.3.28, 10.4.19, 10.3 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Vova Moroz | Assignee: | Marko Mäkelä |
| Resolution: | Incomplete | Votes: | 3 |
| Labels: | corruption | ||
| Environment: |
CentOS7 |
||
| Issue Links: |
|
||||||||||||||||||||||||
| Description |
|
[ERROR] InnoDB: Record in index `item_id` of table `item3`.`deleted_items` was not found on update: TUPLE (info_bits=0, 2 fields): {[4] x (0x819678F8),[4] ;J (0x003B4AD8)}at: COMPACT RECORD(info_bits=32, 2 fields): {[4] x (0x819678F8),[4] ;( (0x003B28F9)} |
| Comments |
| Comment by Marko Mäkelä [ 2020-07-01 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Moroz, do you have any more information on this corruption? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Vova Moroz [ 2020-07-03 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi, Marko! Could you tell wich information is needed and where can I find it? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2021-03-22 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Moroz, SHOW CREATE TABLE could help. Was the index item_id created on a virtual column? If yes, we have plenty of bugs related to indexed virtual columns. If the index is on a regular stored column, then it is possible that the database was corrupted due to
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Valerii Kravchuk [ 2021-07-03 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This still happens in 10.4.19 too, (Galera cluster node) after restart with innodb_fast_shutdown=0 and with innodb_change_buffering = none, for several tables and none of them has virtual columns:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2021-07-03 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
valerii, there exist various bugs with indexed virtual columns that can cause such corruption. Please check if one of the bugs applies to your case, and re-close this bug if appropriate. We should keep in mind that InnoDB corruption usually does not heal by itself; you will have to drop and re-create the corrupted index, or rebuild the table. You might want to check what I wrote in
That applies to non-virtual columns. I am afraid that with indexed virtual columns, it is still easy to trigger corruption via other bugs. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2021-09-17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
valerii, starting with the 10.4 series, virtual columns may ‘secretly’ be used due to Moroz, is this reproducible with a more recent server? Several possible fixes related to this are linked from | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Vova Moroz [ 2021-09-18 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi, Still getting after update on 10.3.29. There are no virtual columns. [ERROR] InnoDB: Record in index `subscribeId` of table `auto3_search_history`.`searchSubscribe` was not found on update: TUPLE (info_bits=0, 2 at: COMPACT RECORD(info_bits=0, 2 fields): {[8] + h(0x80000000002BBC68),[8] / (0x000 00000009C2FD2)}as well as other ones: 2021-09-02 18:34:18 2 [ERROR] InnoDB: Unable to find a record to delete-mark InnoDB: record PHYSICAL RECORD: n_fields 2; compact format; info bits 0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by martina342 [ 2021-09-21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hello Marko, I have the same error on 10.6.5
I think that what caused it was killing a request to update the type of a column, which is varchar/char, and is indexed dropping then recreating the index fixed it. The table is not virtual edit: actually even a non related index is corrupted : edit: this last index corrupted may be due to things I had to do to be able to restart the server to remove the index as it was crashing on start | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2021-09-29 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
martina342, in some other ticket you mentioned that you had run with innodb_undo_log_truncate=ON. Unfortunately, there has been some corruption related to that, to be fixed in the upcoming releases, in martina342 and Moroz, does the corruption go away if you rebuild the table (OPTIMIZE TABLE or ALTER TABLE…FORCE)? If not, I would like to see the SHOW CREATE TABLE output, showing at least the PRIMARY KEY columns and the columns that are part of the problematic secondary index. There is a known bug | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by martina342 [ 2021-09-29 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
no it is not related to undo log truncate, the whole data have been reimported with undo truncation disabled i don't know if optimize table/alter table fix it, as i already fixed the index since my message here are the fields. Both xxx and yyy were corrupted CREATE TABLE `personnes` ( `XXX` varchar(180) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, PRIMARY KEY (`id`), the 2 indexes were modified during big transactions were running on the table | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Vova Moroz [ 2021-09-29 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi, After ALTER TABLE .. FORCE corruption goes away. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2021-09-29 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
martina342, thank you. Because you are using 10.6.5 and not using indexed virtual columns, there should still be some unknown corruption out there. As I noted in I will keep waiting for further feedback from you and Moroz and any other affected users. It would be interesting to know if setting innodb_change_buffering=none (after rebuilding the affected table) would prevent this corruption. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by martina342 [ 2021-10-02 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
hello, a quick update.
i wasn't modifying any index, so it wasn't related to any index creation/modification. i deleted and recreated the mentioned index using index id, and set innodb_change_buffering=none i'm not waiting to see if it corrupt again edit: it was one of the same index that corrupted itself before | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by martina342 [ 2021-10-16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
it's been 2 weeks with innodb_change_buffering=none without any index corruption, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by martina342 [ 2021-11-13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
hello, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by ssauravy [ 2021-12-27 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The same thing happened. innodb_fast_shutdown=0 MariaDB [(none)]> select @@version;
---------------------
--------------------- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2022-02-08 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Is this corruption repeatable for anyone after:
Note: Disabling the change buffering will not fix already corrupted indexes. It will only prevent further corruption by the change buffer. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by martina342 [ 2022-02-08 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
for me, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Juan [ 2022-02-08 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
marko - None of the support cases potentially affected by this which I have been watching have reported any corruption recurrence after changing to innodb_change_buffering=none. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2022-03-22 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This is still waiting for a reproducible test case. A work-around was implemented in 10.5.15, 10.6.7, 10.7.3, 10.8.2 by | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ruben Estrada Orozco [ 2022-07-27 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I think I have a similar error and I already have innodb_change_buffering=none:
could you help me out with this? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2022-08-01 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
rulotec, we can only help with this bug if someone produces a way of reproducing the error on a database that has been initialized, loading the data with SQL statements only (no copying of data files). If the affected table contains indexed virtual columns ( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2023-02-05 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2023-03-06 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
InnoDB change buffer (a possible culprit) was removed in If anyone would still experience this bug, please add a comment here and we'll reopen the issue if needed. |