[MDEV-617] LP:671189 - Query cache is not used for tables or databases with dots in their names Created: 2010-11-04 Updated: 2013-07-18 Resolved: 2013-07-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.0, 5.5.28, 5.3.9, 5.2.12, 5.1.62 |
| Fix Version/s: | 10.0.4 |
| Type: | Bug | Priority: | Minor |
| Reporter: | John Ferlito (Inactive) | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
I've confirmed this bug with mariadb 5.1.49 from our delta rep for lucid (5.1.49-mariadb82) it is not present on mysql 5.1.41 on lucid (5.1.41-3ubuntu12.6) Can be replicated as follows
|
| Comments |
| Comment by Arjen Lentz (Inactive) [ 2010-11-04 ] |
|
Re: Query cache is not used for tables or databases with dots in their names Of course it's utterly nasty to have table names with dots in them, but since it's allowed... |
| Comment by John Ferlito (Inactive) [ 2010-12-06 ] |
|
Re: Query cache is not used for tables or databases with dots in their names |
| Comment by Rasmus Johansson (Inactive) [ 2010-12-06 ] |
|
Launchpad bug id: 671189 |
| Comment by Oleksandr Byelkin [ 2012-11-05 ] |
|
I tried this test suite it looks like working: set GLOBAL query_cache_size=1355776; flush query cache; CREATE DATABASE `foo.bar`; |
| Comment by Elena Stepanova [ 2012-11-05 ] |
|
The missing bit of info in the description is that the default storage engine in ubuntu packages is InnoDB, so moocow is actually an InnoDB table. With this correction, it's still reproducible on all current versions. The test case should be like this: --source include/have_query_cache.inc set GLOBAL query_cache_size=1355776; flush query cache; CREATE DATABASE `foo.bar`; And it's reproducible on MySQL 5.1-5.6 too. |
| Comment by Oleksandr Byelkin [ 2012-11-13 ] |
|
As I thought from comment abouve it is bug of innodb engine: T@5 : | | | | | >Query_cache::ask_handler_allowance |
| Comment by Oleksandr Byelkin [ 2012-11-13 ] |
|
The problem is in names escaping: |
| Comment by Oleksandr Byelkin [ 2012-11-13 ] |
|
tablename_to_filename should be called for innodb engine... |
| Comment by Oleksandr Byelkin [ 2012-11-13 ] |
|
It is also repeatable on MySQL 5.1 (with innobase build from sources) |
| Comment by Oleksandr Byelkin [ 2012-11-14 ] |
|
Fixing this bug require niticeble overhead for each table in the query during caching or returnung from the cache, when we have uncached only 1% of queries. To make the impact minimum we have to change handler interface and makes QC storing both variants of the table/db names (i.e. it can't be done as just a bugfix in old version). |
| Comment by Oleksandr Byelkin [ 2012-11-22 ] |
|
It will not be fixed in 5.* , but in 10.0, because fix will be expensive or need intrusive changes in QC which could be done only in 10.0 |
| Comment by roberto spadim [ 2013-06-09 ] |
|
it's not a bug in 10.0.2!? reset query cache; ENTRY_POSITION_IN_CACHE|STATEMENT_SCHEMA|STATEMENT_TEXT|QUERY_ROWS|QUERY_HITS|QUERY_HITS_TOTAL_TIME_US|QUERY_LAST_HIT_TIME|SELECT_EXPEND_TIME_US|SELECT_LOCK_TIME_US|SELECT_ROWS_READ|TABLES|QUERY_INSERT_TIME|RESULT_LENGTH|RESULT_BLOCKS_COUNT|RESULT_BLOCKS_SIZE|RESULT_BLOCKS_SIZE_USED|RESULT_TABLES_TYPE|RESULT_FOUND_ROWS|FLAGS_CLIENT_LONG_FLAG|FLAGS_CLIENT_PROTOCOL_41|FLAGS_PROTOCOL_TYPE|FLAGS_MORE_RESULTS_EXISTS|FLAGS_IN_TRANS|FLAGS_AUTOCOMMIT|FLAGS_PKT_NR|FLAGS_CHARACTER_SET_CLIENT|FLAGS_CHARACTER_SET_RESULTS|FLAGS_COLLATION_CONNECTION|FLAGS_LIMIT|FLAGS_TIME_ZONE|FLAGS_SQL_MODE|FLAGS_MAX_SORT_LENGTH|FLAGS_GROUP_CONCAT_MAX_LEN|FLAGS_DIV_PRECISION_INCREMENT|FLAGS_DEFAULT_WEEK_FORMAT|FLAGS_LC_TIME_NAMES |
| Comment by Oleksandr Byelkin [ 2013-07-18 ] |
|
fixed in upcoming 10.0. (now in 10.0-merge) |