~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Brian Aker
  • Date: 2009-07-31 05:38:13 UTC
  • mto: (1106.3.2 heap)
  • mto: This revision was merged to the branch mainline in revision 1108.
  • Revision ID: brian@gaz-20090731053813-nip58z7ng0qux5oh
Remove multi key cache

Show diffs side-by-side

added added

removed removed

Lines of Context:
2520
2520
                           &handler::ha_optimize));
2521
2521
}
2522
2522
 
2523
 
 
2524
 
/*
2525
 
  Reassign all tables assigned to a key cache to another key cache
2526
 
 
2527
 
  SYNOPSIS
2528
 
    reassign_keycache_tables()
2529
 
    session             Thread object
2530
 
    src_cache   Reference to the key cache to clean up
2531
 
    dest_cache  New key cache
2532
 
 
2533
 
  NOTES
2534
 
    This is called when one sets a key cache size to zero, in which
2535
 
    case we have to move the tables associated to this key cache to
2536
 
    the "default" one.
2537
 
 
2538
 
    One has to ensure that one never calls this function while
2539
 
    some other thread is changing the key cache. This is assured by
2540
 
    the caller setting src_cache->in_init before calling this function.
2541
 
 
2542
 
    We don't delete the old key cache as there may still be pointers pointing
2543
 
    to it for a while after this function returns.
2544
 
 
2545
 
 RETURN VALUES
2546
 
    0     ok
2547
 
*/
2548
 
 
2549
 
int reassign_keycache_tables(Session *,
2550
 
                             KEY_CACHE *src_cache,
2551
 
                             KEY_CACHE *dst_cache)
2552
 
{
2553
 
  assert(src_cache != dst_cache);
2554
 
  assert(src_cache->in_init);
2555
 
  src_cache->param_buff_size= 0;                // Free key cache
2556
 
  ha_resize_key_cache(src_cache);
2557
 
  ha_change_key_cache(src_cache, dst_cache);
2558
 
  return 0;
2559
 
}
2560
 
 
2561
2523
static bool mysql_create_like_schema_frm(Session* session,
2562
2524
                                         TableList* schema_table,
2563
2525
                                         HA_CREATE_INFO *create_info,