~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_keycache.c

  • Committer: Monty Taylor
  • Date: 2008-07-16 19:10:24 UTC
  • mfrom: (51.1.127 remove-dbug)
  • mto: This revision was merged to the branch mainline in revision 176.
  • Revision ID: monty@inaugust.com-20080716191024-prjgoh7fbri7rx26
MergedĀ fromĀ remove-dbug.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
{
53
53
  int error= 0;
54
54
  MYISAM_SHARE* share= info->s;
55
 
  DBUG_ENTER("mi_assign_to_key_cache");
56
 
  DBUG_PRINT("enter",("old_key_cache_handle: 0x%lx  new_key_cache_handle: 0x%lx",
57
 
                      (long) share->key_cache, (long) key_cache));
58
55
 
59
56
  /*
60
57
    Skip operation if we didn't change key cache. This can happen if we
61
58
    call this for all open instances of the same table
62
59
  */
63
60
  if (share->key_cache == key_cache)
64
 
    DBUG_RETURN(0);
 
61
    return(0);
65
62
 
66
63
  /*
67
64
    First flush all blocks for the table in the old key cache.
109
106
                          share->key_cache))
110
107
    error= my_errno;
111
108
  pthread_mutex_unlock(&share->intern_lock);
112
 
  DBUG_RETURN(error);
 
109
  return(error);
113
110
}
114
111
 
115
112
 
138
135
                         KEY_CACHE *new_key_cache)
139
136
{
140
137
  LIST *pos;
141
 
  DBUG_ENTER("mi_change_key_cache");
142
138
 
143
139
  /*
144
140
    Lock list to ensure that no one can close the table while we manipulate it
159
155
  */
160
156
  multi_key_cache_change(old_key_cache, new_key_cache);
161
157
  pthread_mutex_unlock(&THR_LOCK_myisam);
162
 
  DBUG_VOID_RETURN;
 
158
  return;
163
159
}