1
/* Copyright (C) 2003 MySQL AB
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
20
#include "myisam_priv.h"
25
Assign pages of the index file for a table to a key cache
28
mi_assign_to_key_cache()
30
key_cache_ptr pointer to the key cache handle
31
assign_lock Mutex to lock during assignment
34
One must have a READ lock or a WRITE lock on the table when calling
35
the function to ensure that there is no other writers to it.
37
The caller must also ensure that one doesn't call this function from
38
two different threads with the same table.
41
At present pages for all indexes must be assigned to the same key cache.
48
int mi_assign_to_key_cache(MI_INFO *, KEY_CACHE *)
55
Change all MyISAM entries that uses one key cache to another key cache
59
old_key_cache Old key cache
60
new_key_cache New key cache
63
This is used when we delete one key cache.
65
To handle the case where some other threads tries to open an MyISAM
66
table associated with the to-be-deleted key cache while this operation
67
is running, we have to call 'multi_key_cache_change()' from this
68
function while we have a lock on the MyISAM table list structure.
70
This is safe as long as it's only MyISAM that is using this specific
75
void mi_change_key_cache(KEY_CACHE *, KEY_CACHE *)