~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mf_keycache.c

  • Committer: Brian Aker
  • Date: 2008-12-09 17:33:02 UTC
  • mfrom: (656.1.54 devel)
  • Revision ID: brian@tangent.org-20081209173302-aptngvc7efxnatnt
Merge from Monty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
326
326
          Allocate memory for blocks, hash_links and hash entries;
327
327
          For each block 2 hash links are allocated
328
328
        */
329
 
        if ((keycache->block_root= (BLOCK_LINK*) my_malloc(length,
330
 
                                                           MYF(0))))
 
329
        if ((keycache->block_root= (BLOCK_LINK*) malloc(length)))
331
330
          break;
332
331
        free(keycache->block_mem);
333
332
        keycache->block_mem= 0;
2349
2348
 
2350
2349
  if (locked_and_incremented)
2351
2350
    keycache_pthread_mutex_unlock(&keycache->cache_lock);
2352
 
  if (pread(file, (unsigned char*) buff, length, filepos))
 
2351
  if (!pread(file, (unsigned char*) buff, length, filepos))
2353
2352
    error= 1;
2354
2353
  if (locked_and_incremented)
2355
2354
    keycache_pthread_mutex_lock(&keycache->cache_lock);
3210
3209
        changed blocks appear while we need to wait for something.
3211
3210
      */
3212
3211
      if ((count > FLUSH_CACHE) &&
3213
 
          !(cache= (BLOCK_LINK**) my_malloc(sizeof(BLOCK_LINK*)*count,
3214
 
                                            MYF(0))))
 
3212
          !(cache= (BLOCK_LINK**) malloc(sizeof(BLOCK_LINK*)*count)))
3215
3213
        cache= cache_buff;
3216
3214
      /*
3217
3215
        After a restart there could be more changed blocks than now.