Bug #81511 innodb_memcached "delete @@prefix.key" doessn't work
Submitted: 19 May 2016 18:52 Modified: 29 Jun 2016 9:48
Reporter: James Smith Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Memcached Severity:S3 (Non-critical)
Version:5.7 OS:Linux (red hat)
Assigned to: CPU Architecture:Any

[19 May 2016 18:52] James Smith
Description:
Inconsistency.. to add/set/get entries in innodb_memcached you can use:
 set @@prefix.key x y z
 add @@prefix.key x y z
 get @@prefix.key

But you can't

 delete @@prefix.key

you have to go:

 get @@prefix
 delete key

which is inconsistent

How to repeat:
Create a innodb_memcached set up with two tables used to store memcached entries.

Do

set @@table.key 0 0 1
A

get @@table.key

delete @@table.key

get @@table
delete key
[29 Jun 2016 9:47] MySQL Verification Team
Hello James Smith,

Thank you for the report.
Observed this with 5.7.13 build.

Thanks,
Umesh
[29 Jun 2016 9:47] MySQL Verification Team
-- cli session

mysql> select * from kv_data.kv_store;
+-----------+-------------+-------+------+------+
| key       | value       | flags | cas  | exp  |
+-----------+-------------+-------+------+------+
| test.key  | Hello World |     0 |    1 |    0 |
| test.key1 | Hello world |     0 |    2 |    0 |
+-----------+-------------+-------+------+------+
2 rows in set (0.00 sec)

after last DELETE

mysql> select * from kv_data.kv_store;
+----------+-------------+-------+------+------+
| key      | value       | flags | cas  | exp  |
+----------+-------------+-------+------+------+
| test.key | Hello World |     0 |    1 |    0 |
+----------+-------------+-------+------+------+
1 row in set (0.00 sec)

-- telnet session

set test.key 0 0 11
Hello World
STORED

get @@kv_data
VALUE @@kv_data 0 16
kv_data/kv_store
END

get @@kv_data.test.key
VALUE @@kv_data.test.key 0 11
Hello World
END

add @@kv_data.test.key1 0 0 11
Hello world1
STORED
ERROR

get @@kv_data.test.key1
VALUE @@kv_data.test.key1 0 11
Hello world
END

delete @@kv_data.test.key1
NOT_FOUND

get @@kv_data.test.key1
VALUE @@kv_data.test.key1 0 11
Hello world
END

delete test.key1
DELETED