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

Package:
mysql-server
Source:
mysql-8.0
Description:
MySQL database server and system database setup
Submitter:
Gregory Colpart
Date:
2013-12-02 12:42:05 UTC
Severity:
important
#731076#5
Date:
2013-12-01 17:10:10 UTC
From:
To:
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,

#731076#10
Date:
2013-12-02 12:38:24 UTC
From:
To:
Hi,

I've addressed this for the next upcoming release (somewhere in the
future :)

http://anonscm.debian.org/gitweb/?p=pkg-mysql/pkg-mysql.git;a=commitdiff;h=73fee5070078f92079141cddeca9723a4943689a

Cheers
B