Bug #75887 memcached - configuration script fails if the test database doesn't exists
Submitted: 13 Feb 2015 9:04
Reporter: Umesh Shastry Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Memcached Severity:S3 (Non-critical)
Version:5.6.24 OS:Any
Assigned to: CPU Architecture:Any

[13 Feb 2015 9:04] Umesh Shastry
Description:
Related to Bug #72678 - See, http://dev.mysql.com/doc/refman/5.6/en/innodb-memcached-installing.html

Quoting from manual - Setting Up Required Tables: To configure the memcached plugin so it can interact with InnoDB tables, run the innodb_memcached_config.sql configuration script to install the necessary tables used behind the scenes:

mysql> source MYSQL_HOME/share/innodb_memcached_config.sql

But the configuration script fails if the "test" database doesn't exists:

[umshastr@hod03]/export/umesh/mysql-5.6.24: bin/mysql -uroot -p  -S /tmp/mysql_ushastry.sock
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 16
Server version: 5.6.24-enterprise-commercial-advanced MySQL Enterprise Server - Advanced Edition (Commercial)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)

mysql> \q
Bye
[umshastr@hod03]/export/umesh/mysql-5.6.24: bin/mysql -uroot -p  -S /tmp/mysql_ushastry.sock < share/innodb_memcached_config.sql
Enter password:
ERROR 1049 (42000) at line 86: Unknown database 'test'

This seems to be handled in 5.7.6 (post Bug #72678 fix)

[umshastr@hod03]/export/umesh/mysql-5.7.6: diff share/innodb_memcached_config.sql ../mysql-5.6.24/share/innodb_memcached_config.sql
86d85
< CREATE DATABASE IF NOT EXISTS test;

How to repeat:
// How to repeat

See description

Suggested fix:
5.6 configuration script should include "CREATE DATABASE IF NOT EXISTS test;" just before the "USE test" statement
[13 Feb 2015 9:04] Umesh Shastry
5.7.5 and above is not affected because of Bug #72678	InnoDB Memcached Plugin Configuration - test database