I inherited a system at work that extensively uses a large number of tables with a dollar sign ($) in their names. The system has been on MySQL 5.0 for a long time, and it depends on the query cache to speed up certain operations that query those tables a lot.
We just got a new server so I was interested in getting 5.1 for some of the new features, so I downloaded and compiled Percona Server 5.1.47-rel11.2. Performance though was horrible, and I narrowed it down to a query involving a table with a ‘$’ in it. Doing some testing, it seems any queries involving an InnoDB table with a dollar sign in it are not cached. If I change the table name to remove the ‘$’ or change the engine to MyISAM, the query is cached.
Is there any way to get around this issue? I’m not sure if it’s a bug with Percona or upstream MySQL.