~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/records.cc

Merged build changes from Antony.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
*/
54
54
 
55
55
void init_read_record_idx(READ_RECORD *info,
56
 
                          THD *thd __attribute__((__unused__)),
 
56
                          THD *thd __attribute__((unused)),
57
57
                          TABLE *table,
58
58
                          bool print_error, uint idx)
59
59
{
60
60
  empty_record(table);
61
 
  bzero((char*) info,sizeof(*info));
 
61
  memset((char*) info, 0, sizeof(*info));
62
62
  info->table= table;
63
63
  info->file=  table->file;
64
64
  info->record= table->record[0];
146
146
{
147
147
  IO_CACHE *tempfile;
148
148
 
149
 
  bzero((char*) info,sizeof(*info));
 
149
  memset((char*) info, 0, sizeof(*info));
150
150
  info->thd=thd;
151
151
  info->table=table;
152
152
  info->file= table->file;
502
502
    return(1);
503
503
#ifdef HAVE_purify
504
504
  // Avoid warnings in qsort
505
 
  bzero(info->cache,rec_cache_size+info->cache_records* info->struct_length+1);
 
505
  memset(info->cache, 0,
 
506
         rec_cache_size+info->cache_records* info->struct_length+1);
506
507
#endif
507
508
  info->read_positions=info->cache+rec_cache_size;
508
509
  info->cache_pos=info->cache_end=info->cache;
515
516
  register uint i;
516
517
  ulong length;
517
518
  my_off_t rest_of_file;
518
 
  int16 error;
 
519
  int16_t error;
519
520
  uchar *position,*ref_position,*record_pos;
520
521
  ulong record;
521
522
 
568
569
      record=uint3korr(position);
569
570
      position+=3;
570
571
      record_pos=info->cache+record*info->reclength;
571
 
      if ((error=(int16) info->file->rnd_pos(record_pos,info->ref_pos)))
 
572
      if ((error=(int16_t) info->file->rnd_pos(record_pos,info->ref_pos)))
572
573
      {
573
574
        record_pos[info->error_offset]=1;
574
575
        shortstore(record_pos,error);