Bug #73287 daemon_memcached_option not shown correctly
Submitted: 14 Jul 2014 3:07 Modified: 24 Jul 2014 15:29
Reporter: Erico Fusco (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Memcached Severity:S3 (Non-critical)
Version:5.6.17, 5.7.4 OS:Any
Assigned to: CPU Architecture:Any
Tags: innodb memcached

[14 Jul 2014 3:07] Erico Fusco
Description:
When more than one option is defined in the option 'daemon_memcached_option', only one is shown in 'show variables', however, all memcached settings are applied properly.

How to repeat:
Changed the default port to 11221

/etc/my.cnf:

...
daemon_memcached_option = -m128 -p11221
...

-----------------------

It doesn't show in my variable:

mysql> show variables like 'daemon_memcached_option';
+-------------------------+-------+
| Variable_name           | Value |
+-------------------------+-------+
| daemon_memcached_option | -m128 |
+-------------------------+-------+

-------------------------------

But the change was done successfully:

epf-mac:data erico$ telnet 127.0.0.1 11221
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
set hello 1 0 5
world
STORED
version
VERSION 5.6.17
quit
Connection closed by foreign host.

Suggested fix:
Show all memcached settings properly.
[14 Jul 2014 3:12] Erico Fusco
Obviously the same result when query the variables table.

mysql> SELECT * FROM GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'DAEMON_MEMCACHED_OPTION';
+-------------------------+----------------+
| VARIABLE_NAME           | VARIABLE_VALUE |
+-------------------------+----------------+
| DAEMON_MEMCACHED_OPTION | -m128          |
+-------------------------+----------------+
[14 Jul 2014 6:20] MySQL Verification Team
Hello Erico,

Thank you for the report.
Verified as described.

Thanks,
Umesh
[14 Jul 2014 6:23] MySQL Verification Team
// 5.7.4

[ushastry@cluster-repo mysql-5.7.4]$ more my.cnf |grep daemon_memcached_option
daemon_memcached_option = -m128 -p11221

mysql> show variables like 'daemon_memcached_option';
+-------------------------+-------+
| Variable_name           | Value |
+-------------------------+-------+
| daemon_memcached_option | -m128 |
+-------------------------+-------+
1 row in set (0.00 sec)

mysql> \q

** uninstalled/installed plugin to see if that helps

mysql> uninstall plugin daemon_memcached;                                                                                                                                                         Query OK, 0 rows affected (2.00 sec)

mysql> INSTALL PLUGIN daemon_memcached SONAME 'libmemcached.so';
Query OK, 0 rows affected (0.00 sec)

mysql> show variables like 'daemon_memcached_option';
+-------------------------+-------+
| Variable_name           | Value |
+-------------------------+-------+
| daemon_memcached_option | -m128 |
+-------------------------+-------+
1 row in set (0.00 sec)

** Connected using new port too, which means it is taking the new value

[ushastry@cluster-repo mysql-5.7.4]$ telnet 127.0.0.1 11211
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
[ushastry@cluster-repo mysql-5.7.4]$ telnet 127.0.0.1 11221
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.

** rearranged options - so only first option is listed

[ushastry@cluster-repo mysql-5.7.4]$ more my.cnf |grep daemon_memcached_option
daemon_memcached_option = -p11221 -m128

mysql> show variables like 'daemon_memcached_option';
+-------------------------+---------+
| Variable_name           | Value   |
+-------------------------+---------+
| daemon_memcached_option | -p11221 |
+-------------------------+---------+
1 row in set (0.00 sec)

mysql> \q
Bye

**

[ushastry@cluster-repo mysql-5.7.4]$ more my.cnf |grep daemon_memcached_option
daemon_memcached_option = "-p11221 -m128"
[ushastry@cluster-repo mysql-5.7.4]$

mysql> show variables like 'daemon_memcached_option';
+-------------------------+---------+
| Variable_name           | Value   |
+-------------------------+---------+
| daemon_memcached_option | -p11221 |
+-------------------------+---------+
1 row in set (0.00 sec)
[24 Jul 2014 15:29] Daniel Price
Fixed as of the upcoming 5.7.5 release, and here's the changelog entry:

When multiple "daemon_memcached_option" options are defined, the
"INFORMATION_SCHEMA.GLOBAL_VARIABLES" table and "SHOW VARIABLES" statement
should only display the first "daemon_memcached_option" option that is
defined in the command line string or in the MySQL configuration file.

Thank you for the bug report.