my_bool ha_partition::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)
{
  DBUG_ENTER("ha_partition::reg_query_cache_dependant_table");
  qc_engine_callback engine_callback;
  ulonglong engine_data;
  /* ask undelying engine */
  if (!file->register_query_cache_table(thd, key,
                                        key_len,
                                        &engine_callback,
                                        &engine_data))
  {
    DBUG_PRINT("qcache", ("Handler does not allow caching for %s.%s",
                          key,
                          key + table_share->db.length + 1));
    /*
      As this can change from call to call, don't reset set
      thd->lex->safe_to_cache_query
    */
    thd->query_cache_is_applicable= 0;        // Query can't be cached
    DBUG_RETURN(TRUE);
  }
  (++(*block_table))->n= ++(*n);
  if (!cache->insert_table(key_len,
                           key, (*block_table),
                           table_share->db.length,
                           type,
                           engine_callback, engine_data,
                           FALSE))
    DBUG_RETURN(TRUE);
  DBUG_RETURN(FALSE);
}
my_bool ha_partition::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)
{
  DBUG_ENTER("ha_partition::reg_query_cache_dependant_table");
  qc_engine_callback engine_callback;
  ulonglong engine_data;
   
  if (!file->register_query_cache_table(thd, key,
                                        key_len,
                                        &engine_callback,
                                        &engine_data))
  {
    DBUG_PRINT("qcache", ("Handler does not allow caching for %s.%s",
                          key,
                          key + table_share->db.length + 1));
     
    thd->query_cache_is_applicable= 0;         
    DBUG_RETURN(TRUE);
  }
  (++(*block_table))->n= ++(*n);
  if (!cache->insert_table(key_len,
                           key, (*block_table),
                           table_share->db.length,
                           type,
                           engine_callback, engine_data,
                           FALSE))
    DBUG_RETURN(TRUE);
  DBUG_RETURN(FALSE);
}