Bug #76591 Secondary index corrupted on timestamp type column
Submitted: 4 Apr 2015 0:43 Modified: 15 May 2015 14:50
Reporter: Benjamin Lin Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.6.20-enterprise-commercial-advanced OS:Linux (Centos 2.6.32-431.3.1.el6.x86_64)
Assigned to: CPU Architecture:Any

[4 Apr 2015 0:43] Benjamin Lin
Description:
We have mutiple MySQL Enterprise installation and recently compress some of tables in few of installations. And the error poping out like this in error log:
2015-03-14 05:01:23 7fb11cbd5700  InnoDB: unable to find a record to delete-mark
InnoDB: tuple DATA TUPLE: 2 fields;
 0: len 4; hex 5503eae2; asc U   ;;
 1: len 47; hex 504c4d4e2d504c4d4e2f524e432d3334312f574254532d353830382f5743454c2d3538303831312f41444a532d3233; asc PLMN-PLMN/RNC-341/WBTS-5808/WCEL-580811/ADJS-23;;

InnoDB: record PHYSICAL RECORD: n_fields 2; compact format; info bits 0
 0: len 4; hex 5503eae2; asc U   ;;
 1: len 30; hex 504c4d4e2d504c4d4e2f524e432d3334312f574254532d353830382f5743; asc PLMN-PLMN/RNC-341/WBTS-5808/WC; (total 47 bytes);

space 36229 offset 262984 (132 records, index id 3031)
InnoDB: Submit a detailed bug report to http://bugs.mysql.com

coincidence is all the affect index is coming from same table, same index. Index column is 'timestamp' type. 

How to repeat:
I can't repeat the problem so far, but it is happening on multiple production servers.

Suggested fix:
I have not tried to drop the index and recreate it. I want to see if there is any bug around this issue.
[6 Apr 2015 7:17] MySQL Verification Team
I think it would be good to try 5.6.23 or newer, since it has this bug fixed:
https://bugs.mysql.com/bug.php?id=73767

Another potential problem with compressed barracuda tables is this:
https://bugs.mysql.com/bug.php?id=73689

So I'd advise 5.6.23 and rebuild the affected tables, then check if errors happen?
[6 Apr 2015 16:58] Benjamin Lin
Yes I will follow up of upgrading and let you know.
[6 Apr 2015 17:30] Benjamin Lin
Before I upgrading production servers, would you please let me know what is the actual impact of the first bug you mention? and rebuild entire table is required? or I only need to rebuild that secondary index? thank you very much
[7 Apr 2015 7:24] MySQL Verification Team
Rebuild of secondary index should be good enough, but since we don't know exactly what the issue is on your case, I just mentioned to rebuild table.

Actually, there is yet another fix in 5.6.21 that might also be worth mentioning.

Bug 18631496 - MULTIPLE PURGE THREADS - CORRUPTION - ERROR IN SEC INDEX ENTRY UPDATE 

---
  Though seems very rare case, purge process might attempt to delete
secondary index record which is not marked as deleted.
  
  If not marked as deleted, the record must not be deleted. Because the
deleting causes the data corruption (inconsistency at the secondary index).
----
[15 Apr 2015 14:50] MySQL Verification Team
News about the upgrade?. Thanks.
[16 May 2015 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".