1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

fixed MySQL bug#53775:

Now partition engine adds underlying tables to the QC and ask underlying tables engine permittion to cache the query and return result of the query.

Incorrect QC cleanup in case of table registration failure fixe.

Unified interface for myisammrg & partitioned engnes for QC.
This commit is contained in:
unknown
2012-07-13 22:17:32 +03:00
parent 718bbcbfd0
commit 9f6a1c5842
13 changed files with 739 additions and 93 deletions

View File

@@ -1689,6 +1689,8 @@ public:
virtual ~handler_add_index() {}
};
class Query_cache;
class Query_cache_block_table;
/**
The handler class is the interface for dynamically loadable
storage engines. Do not add ifdefs and take care when adding or
@@ -2522,6 +2524,46 @@ public:
return TRUE;
}
/*
Count tables invisible from all tables list on which current one built
(like myisammrg and partitioned tables)
tables_type mask for the tables should be added herdde
returns number of such tables
*/
virtual uint count_query_cache_dependant_tables(uint8 *tables_type
__attribute__((unused)))
{
return 0;
}
/*
register tables invisible from all tables list on which current one built
(like myisammrg and partitioned tables).
@note they should be counted by method above
cache Query cache pointer
block Query cache block to write the table
n Number of the table
@retval FALSE - OK
@retval TRUE - Error
*/
virtual my_bool
register_query_cache_dependant_tables(THD *thd
__attribute__((unused)),
Query_cache *cache
__attribute__((unused)),
Query_cache_block_table **block
__attribute__((unused)),
uint *n __attribute__((unused)))
{
return FALSE;
}
/*
Check if the primary key (if there is one) is a clustered and a