Bug #71153 mysql memcached incorrect expiration time
Submitted: 16 Dec 2013 14:34 Modified: 29 Aug 2019 20:12
Reporter: Michael Ivanov Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Memcached Severity:S3 (Non-critical)
Version:5.6.21 OS:Linux (CentOS 6)
Assigned to: MySQL Verification Team CPU Architecture:Any

[16 Dec 2013 14:34] Michael Ivanov
Description:
When you use absolute timestamp values for expiration time using memcached interface and have memcached cache_policies set to caching, the server stores it correctly in InnoDB table, but treats it as a number of seconds from current time when storing it inside memcached slabs.

How to repeat:
set t1 0 20 5
12345
STORED

works as expected

set t1 0 1387203999 5
12345
STORED

works as expected for InnoDB container, but adds current time for memcached slabs

Suggested fix:
Make it work according to https://github.com/memcached/memcached/blob/master/doc/protocol.txt (search for expiration times) for memcached internal slabs
[22 Apr 2014 14:03] Michael Ivanov
Is there any chance to get it fixed? It is pretty inconvinient to not be able to use absolute expiration values in correct way.
[29 Sep 2014 13:16] Michael Ivanov
The bug is still present is MySQL 5.6.21
[29 Sep 2014 13:17] Michael Ivanov
changed the affected version
[29 Aug 2019 20:12] MySQL Verification Team
Hi,

I cannot reproduce this with 5.6.44

when I do 

set t3 0 1567109398 5
11111

I properly see in the db:
| t3 | 11111        |    0 |    8 | 1567109398 |

and when I do

set t1 0 20 5
11111

I see again properly:
| t1 | 11111        |    0 |    6 | 1567109222 |

where 1567109222 is exactly unix_timestamp(now())+20