Description:
Documentation https://dev.mysql.com/doc/refman/8.0/en/innodb-memcached-multiple-get-range-query.html says:
---
When retrieving multiple values in a single get command, you can switch tables (using @@containers.name notation) to retrieve the value for the first key, but you cannot switch tables for subsequent keys.
---
It seems it doesn't work
How to repeat:
I have 2 tables:
CREATE TABLE `auth` (
`email` varchar(96) COLLATE utf8_unicode_ci NOT NULL,
`password` char(64) COLLATE utf8_unicode_ci NOT NULL,
`type` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
PRIMARY KEY (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
CREATE TABLE `numbers` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`counter` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
These tables are described in innodb_memcache.containers:
select * from innodb_memcache.containers where name in('auth','numbers');
+---------+------------------+----------+-------------+---------------+-------+------------+--------------------+------------------------+
| name | db_schema | db_table | key_columns | value_columns | flags | cas_column | expire_time_column | unique_idx_name_on_key |
+---------+------------------+----------+-------------+---------------+-------+------------+--------------------+------------------------+
| auth | db | auth | email | password|type | 0 | 0 | 0 | PRIMARY |
| numbers | db | numbers | id | counter | 0 | 0 | 0 | PRIMARY |
+---------+------------------+----------+-------------+---------------+-------+------------+--------------------+------------------------+
Here is the content for these tables:
MySQL> select * from auth;
+------------------+----------+------+
| email | password | type |
+------------------+----------+------+
| ivan@example.com | qwerty | xxx |
| max@example.com | 1234567 | 99 |
+------------------+----------+------+
2 rows in set (0.00 sec)
MySQL> select * from numbers;
+----+---------+
| id | counter |
+----+---------+
| 1 | 12 |
| 2 | 13 |
+----+---------+
2 rows in set (0.00 sec)
Here is my telnet session with memcached plugin:
get @@auth.ivan@example.com
VALUE @@auth.ivan@example.com 0 68
qwerty |xxx
END
get @@numbers.1
VALUE @@numbers.1 0 2
12
END
get @@auth
VALUE @@auth 0 21
CompromizedUsers/auth
END
get @@numbers.1 ivan@example.com
VALUE @@numbers.1 0 2
12
VALUE ivan@example.com 0 2
12
END
Value for the second key is not correct.