~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mf_keycaches.c

  • Committer: Brian Aker
  • Date: 2008-08-09 06:20:11 UTC
  • Revision ID: brian@tangent.org-20080809062011-vkyz8gszh6jpk3ga
Converted myisam away from my_bool

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
/* Get key and length for a SAFE_HASH_ENTRY */
79
79
 
80
80
static uchar *safe_hash_entry_get(SAFE_HASH_ENTRY *entry, size_t *length,
81
 
                                  my_bool not_used __attribute__((unused)))
 
81
                                  bool not_used __attribute__((unused)))
82
82
{
83
83
  *length=entry->length;
84
84
  return (uchar*) entry->key;
103
103
    1  error
104
104
*/
105
105
 
106
 
static my_bool safe_hash_init(SAFE_HASH *hash, uint elements,
 
106
static bool safe_hash_init(SAFE_HASH *hash, uint elements,
107
107
                              uchar *default_value)
108
108
{
109
109
  if (hash_init(&hash->hash, &my_charset_bin, elements,
179
179
    1  error (Can only be EOM). In this case my_message() is called.
180
180
*/
181
181
 
182
 
static my_bool safe_hash_set(SAFE_HASH *hash, const uchar *key, uint length,
 
182
static bool safe_hash_set(SAFE_HASH *hash, const uchar *key, uint length,
183
183
                             uchar *data)
184
184
{
185
185
  SAFE_HASH_ENTRY *entry;
186
 
  my_bool error= 0;
 
186
  bool error= 0;
187
187
 
188
188
  rw_wrlock(&hash->mutex);
189
189
  entry= (SAFE_HASH_ENTRY*) hash_search(&hash->hash, key, length);
290
290
static SAFE_HASH key_cache_hash;
291
291
 
292
292
 
293
 
my_bool multi_keycache_init(void)
 
293
bool multi_keycache_init(void)
294
294
{
295
295
  return safe_hash_init(&key_cache_hash, 16, (uchar*) dflt_key_cache);
296
296
}
342
342
*/
343
343
 
344
344
 
345
 
my_bool multi_key_cache_set(const uchar *key, uint length,
 
345
bool multi_key_cache_set(const uchar *key, uint length,
346
346
                            KEY_CACHE *key_cache)
347
347
{
348
348
  return safe_hash_set(&key_cache_hash, key, length, (uchar*) key_cache);