summaryrefslogtreecommitdiff
path: root/sql/ha_partition.h
diff options
context:
space:
mode:
authorunknown <sanja@montyprogram.com>2012-07-13 22:17:32 +0300
committerunknown <sanja@montyprogram.com>2012-07-13 22:17:32 +0300
commit9f6a1c5842fc8f71463d48e4da4ec692aadeacc1 (patch)
treefd7a7367d091702d3081ef719125c038ddc4cfb0 /sql/ha_partition.h
parent718bbcbfd0dd1aa858e4e3ba0583e85d81414df0 (diff)
downloadmariadb-git-9f6a1c5842fc8f71463d48e4da4ec692aadeacc1.tar.gz
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.
Diffstat (limited to 'sql/ha_partition.h')
-rw-r--r--sql/ha_partition.h26
1 files changed, 12 insertions, 14 deletions
diff --git a/sql/ha_partition.h b/sql/ha_partition.h
index aa9179f9f69..0f922394ec5 100644
--- a/sql/ha_partition.h
+++ b/sql/ha_partition.h
@@ -544,22 +544,20 @@ public:
virtual int extra(enum ha_extra_function operation);
virtual int extra_opt(enum ha_extra_function operation, ulong cachesize);
virtual int reset(void);
- /*
- Do not allow caching of partitioned tables, since we cannot return
- a callback or engine_data that would work for a generic engine.
- */
- virtual my_bool register_query_cache_table(THD *thd, char *table_key,
- uint key_length,
- qc_engine_callback
- *engine_callback,
- ulonglong *engine_data)
- {
- *engine_callback= NULL;
- *engine_data= 0;
- return FALSE;
- }
+ virtual uint count_query_cache_dependant_tables(uint8 *tables_type);
+ virtual my_bool
+ register_query_cache_dependant_tables(THD *thd,
+ Query_cache *cache,
+ Query_cache_block_table **block,
+ uint *n);
private:
+ my_bool reg_query_cache_dependant_table(THD *thd,
+ char *key, uint key_len, uint8 type,
+ Query_cache *cache,
+ Query_cache_block_table
+ **block_table,
+ handler *file, uint *n);
static const uint NO_CURRENT_PART_ID;
int loop_extra(enum ha_extra_function operation);
void late_extra_cache(uint partition_id);