Bug #37364 | InnoDB: error in sec index entry update | ||
---|---|---|---|
Submitted: | 12 Jun 2008 12:52 | Modified: | 7 Nov 2015 7:30 |
Reporter: | Michael Koloberdin | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S2 (Serious) |
Version: | 5.0.51a, 5.5.21 | OS: | Linux (Linux ES release 4) |
Assigned to: | Heikki Tuuri | CPU Architecture: | Any |
[12 Jun 2008 12:52]
Michael Koloberdin
[12 Jun 2008 12:53]
Heikki Tuuri
I have last time seen this error reported about 3 years ago.
[12 Jun 2008 13:04]
Michael Koloberdin
It started to happen only recently with the increase of the website traffic (and consequently with the number of inserts/updates into the "geostats" table) and/or with the number of records in the table. mysql> select count(*) from geostats; +----------+ | count(*) | +----------+ | 1548595 | +----------+
[12 Jun 2008 13:11]
Michael Koloberdin
Also, when it started to happen the server was running MySQL version 5.0.27. I then upgraded it to .51a in an attempt to fix this problem. But it did not help at all.
[13 Jun 2008 13:05]
Susanne Ebrecht
Michael, my colleague set your comments to private, so don't worry.
[24 Jun 2008 17:17]
Heikki Tuuri
Michael, can you post the entire .err log? This kind of corruption may be a result of incomplete crash recovery after a mysqld crash. If some secondary index records are not 'redone' in the recovery, secondary indexes get out-of-sync from the clustered index. Regards, Heikki
[2 Oct 2008 21:56]
Ondrej KudlĂk
We have similar (or same) problem on Debian 5.0.51a MySQL, it start just after upgrade from 5.0.32 on heavy used table (bayes data for spamassassin). Database is restarted with every error. I can provide more info if needed, just tell me exactly what you need. mysqld[20823]: InnoDB: error in sec index entry update in mysqld[20823]: InnoDB: index `bayes_token_idx2` of table `bayes/bayes_token` mysqld[20823]: InnoDB: tuple DATA TUPLE: 3 fields; mysqld[20823]: 0: len 4; hex 80000001; asc ;; 1: len 4; hex c8e4768f; asc v ;; 2: len 5; hex 0265132020; asc e ;; mysqld[20823]: mysqld[20823]: InnoDB: record PHYSICAL RECORD: n_fields 3; compact format; info bits 32 mysqld[20823]: 0: len 4; hex 80000001; asc ;; 1: len 4; hex c8e4768f; asc v ;; 2: len 5; hex c4970d000b; asc ;; mysqld[20823]: mysqld[20823]: TRANSACTION 0 380959710, ACTIVE 0 sec, process no 20822, OS thread id 1153395040 updating or deleting, thread declared inside InnoDB 498 mysqld[20823]: mysql tables in use 1, locked 1 mysqld[20823]: 29 lock struct(s), heap size 6752, undo log entries 59 mysqld[20823]: MySQL thread id 362210, query id 22631043 someserver 192.168.15.15 sa_user update mysqld[20823]: INSERT INTO bayes_token mysqld[20823]: (id, token, spam_count, ham_count, atime) mysqld[20823]: VALUES ('1','E<E8><A4>^W\r','1','0','1222932198') mysqld[20823]: ON DUPLICATE KEY UPDATE spam_count = GREATEST(spam_count + '1', 0), mysqld[20823]: ham_count = GREATEST(ham_count + '0', 0 mysqld[20823]: mysqld[20823]: InnoDB: Submit a detailed bug report to http://bugs.mysql.com
[17 Nov 2008 21:59]
James Day
If you see this error and you have an index on a partial column, first ALTER TABLE <tablename> ENGINE=INNODB to rebuild the whole table and all indexes. See bug #21838. Once you've done that, CHECK TABLE <tablename> to see if it's OK after the rebuild. If commenting on this bug, please confirm that you have done the rebuild or created the table with version 5.0.48 or later so we can be sure that you're not seeing the fixed bug. We'll also need to see the indexes you're using so we can look for the chance of another problem in that area. James Day. MySQL Senior Support Engineer, Sun Microsystems
[8 Mar 2012 10:51]
Arnaud Adant
most likely explained by : Bug 13807811 - BTR_PCUR_RESTORE_POSITION() CAN SKIP A RECORD.
[13 Jun 2012 23:57]
James Day
Correction: my last comment should have mentioned bug 28138, which was fixed in 5.0.48 and 5.1.21. Existing damage would remain in the index so you should upgrade to at least that version then drop and add back the secondary index, only applies if you are using a column prefix index.
[7 Nov 2015 7:30]
MySQL Verification Team
There is no testcase and not enough details to confirm any bug. Please open a new bug report if you see corruption on 5.5.54/5.6.27 or newer.