~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/records.cc

init_read_record_idx return result should be checked now that it checks startIndexScan result.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
  read_record= rr_sequential;
49
49
}
50
50
 
51
 
void ReadRecord::init_read_record_idx(Session *, 
52
 
                                      Table *table_arg,
53
 
                                      bool print_error_arg, 
54
 
                                      uint32_t idx)
 
51
int ReadRecord::init_read_record_idx(Session *,
 
52
                                     Table *table_arg,
 
53
                                     bool print_error_arg,
 
54
                                     uint32_t idx)
55
55
{
56
56
  table_arg->emptyRecord();
57
57
  table= table_arg;
61
61
 
62
62
  table->status=0;                      /* And it's always found */
63
63
  if (not table->cursor->inited)
64
 
    table->cursor->startIndexScan(idx, 1);
 
64
  {
 
65
    int error= table->cursor->startIndexScan(idx, 1);
 
66
    if (error != 0)
 
67
      return error;
 
68
  }
65
69
  /* read_record will be changed to rr_index in rr_index_first */
66
70
  read_record= rr_index_first;
 
71
 
 
72
  return 0;
67
73
}
68
74
 
69
75