[debian-mysql] Bug#731076: mysql-server: query cache not used when InnoDB tables and name with special chars

Gregory Colpart reg at evolix.fr
Sun Dec 1 17:10:10 UTC 2013


Package: mysql-server
Severity: important
Tags: fixed-upstream

Hello,

MySQL has an incredible bug: if you have special chars in table or db
name, Query Cache is not used with InnoDB tables. This bug affects
mysql-server on squeeze/wheezy/testing/sid, but was not in lenny.


Example with db name :

mysql> create database `foo-bar`;
mysql> create table `foo-bar`.baz (a int) engine=InnoDB;
mysql> insert into `foo-bar`.baz values (1);
mysql> select * from `foo-bar`.baz;
mysql> show status like 'Qcache_hits';
+---------------+--------+
| Variable_name | Value  |
+---------------+--------+
| Qcache_hits   | 0      |
+---------------+--------+
mysql> select * from baz;
mysql> show status like 'Qcache_hits';
+---------------+--------+
| Variable_name | Value  |
+---------------+--------+
| Qcache_hits   | 0      |
+---------------+--------+


Example with table name :

mysql> create database foobar;
mysql> create table foobar.`baz-qux` (a int) engine=InnoDB;
mysql> insert into foobar.`baz-qux` values (1);
mysql> select * from foobar.`baz-qux`;
mysql> show status like 'Qcache_hits';
+---------------+--------+
| Variable_name | Value  |
+---------------+--------+
| Qcache_hits   | 0      |
+---------------+--------+
mysql> select * from foobar.`baz-qux`;
mysql> show status like 'Qcache_hits';
+---------------+--------+
| Variable_name | Value  |
+---------------+--------+
| Qcache_hits   | 0      |
+---------------+--------+


This bug is reported and fixed upstream: http://bugs.mysql.com/bug.php?id=64821
All MySQL versions between 5.1 and 5.6.8 are affected.
Fix is in 5.6.9 : http://dev.mysql.com/doc/relnotes/mysql/5.6/en/news-5-6-9.html

Regards,
-- 
Grégory Colpart <reg at evolix.fr>  GnuPG:4096R/B8612B5D
Evolix - Hébergement et Infogérance Open Source http://www.evolix.fr/



More information about the pkg-mysql-maint mailing list