~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mf_keycache.c

Merged build changes from Antony.

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
  I/O finished.
102
102
*/
103
103
 
104
 
#include "my_global.h"
105
 
#include "mysys_err.h"
106
 
#include <my_sys.h>
 
104
#include <drizzled/global.h>
 
105
#include <mysys/mysys_err.h>
 
106
#include <mysys/my_sys.h>
107
107
#include <keycache.h>
108
 
#include <m_string.h>
109
 
#include <my_bit.h>
 
108
#include <mystrings/m_string.h>
 
109
#include <mysys/my_bit.h>
110
110
#include <errno.h>
111
111
#include <stdarg.h>
112
112
 
238
238
 
239
239
static inline uint next_power(uint value)
240
240
{
241
 
  return (uint) my_round_up_to_next_power((uint32) value) << 1;
 
241
  return (uint) my_round_up_to_next_power((uint32_t) value) << 1;
242
242
}
243
243
 
244
244
 
353
353
    keycache->hash_link_root= (HASH_LINK*) ((char*) keycache->hash_root +
354
354
                                            ALIGN_SIZE((sizeof(HASH_LINK*) *
355
355
                                                        keycache->hash_entries)));
356
 
    bzero((uchar*) keycache->block_root,
357
 
          keycache->disk_blocks * sizeof(BLOCK_LINK));
358
 
    bzero((uchar*) keycache->hash_root,
359
 
          keycache->hash_entries * sizeof(HASH_LINK*));
360
 
    bzero((uchar*) keycache->hash_link_root,
361
 
          keycache->hash_links * sizeof(HASH_LINK));
 
356
    memset((uchar*) keycache->block_root, 0,
 
357
           keycache->disk_blocks * sizeof(BLOCK_LINK));
 
358
    memset((uchar*) keycache->hash_root, 0,
 
359
           keycache->hash_entries * sizeof(HASH_LINK*));
 
360
    memset((uchar*) keycache->hash_link_root, 0,
 
361
           keycache->hash_links * sizeof(HASH_LINK));
362
362
    keycache->hash_links_used= 0;
363
363
    keycache->free_hash_list= NULL;
364
364
    keycache->blocks_used= keycache->blocks_changed= 0;
383
383
 
384
384
    keycache->waiting_for_hash_link.last_thread= NULL;
385
385
    keycache->waiting_for_block.last_thread= NULL;
386
 
    bzero((uchar*) keycache->changed_blocks,
387
 
          sizeof(keycache->changed_blocks[0]) * CHANGED_BLOCKS_HASH);
388
 
    bzero((uchar*) keycache->file_blocks,
389
 
          sizeof(keycache->file_blocks[0]) * CHANGED_BLOCKS_HASH);
 
386
    memset((uchar*) keycache->changed_blocks, 0,
 
387
           sizeof(keycache->changed_blocks[0]) * CHANGED_BLOCKS_HASH);
 
388
    memset((uchar*) keycache->file_blocks, 0,
 
389
           sizeof(keycache->file_blocks[0]) * CHANGED_BLOCKS_HASH);
390
390
  }
391
391
  else
392
392
  {
3478
3478
            if (!(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH |
3479
3479
                                   BLOCK_REASSIGNED)))
3480
3480
            {
3481
 
              struct st_hash_link *next_hash_link;
3482
 
              my_off_t            next_diskpos;
3483
 
              File                next_file;
3484
 
              uint                next_status;
3485
 
              uint                hash_requests;
 
3481
              struct st_hash_link *next_hash_link= NULL;
 
3482
              my_off_t            next_diskpos= 0;
 
3483
              File                next_file= 0;
 
3484
              uint                next_status= 0;
 
3485
              uint                hash_requests= 0;
3486
3486
 
3487
3487
              total_found++;
3488
3488
              found++;