~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle-1.0/row.c

  • Committer: Olaf van der Spek
  • Date: 2011-11-09 19:27:44 UTC
  • mto: This revision was merged to the branch mainline in revision 2457.
  • Revision ID: olafvdspek@gmail.com-20111109192744-xgu8uyi2f89ebwd1
Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
    if (drizzle_row_read(result, ret_ptr) == 0 || *ret_ptr != DRIZZLE_RETURN_OK)
78
78
      return NULL;
79
79
 
80
 
    result->row= (drizzle_row_t)malloc((sizeof(drizzle_field_t) + sizeof(size_t)) * result->column_count);
 
80
    result->row= malloc((sizeof(drizzle_field_t) + sizeof(size_t)) *
 
81
                        result->column_count);
81
82
    if (result->row == NULL)
82
83
    {
83
84
      drizzle_set_error(result->con->drizzle, "drizzle_row_buffer", "malloc");
202
203
    /* Got EOF packet, no more rows. */
203
204
    con->result->row_current= 0;
204
205
    con->result->warning_count= drizzle_get_byte2(con->buffer_ptr + 1);
205
 
    con->status= drizzle_con_status_t(drizzle_get_byte2(con->buffer_ptr + 3));
 
206
    con->status= drizzle_get_byte2(con->buffer_ptr + 3);
206
207
    con->buffer_ptr+= 5;
207
208
    con->buffer_size-= 5;
208
209
  }
213
214
    return DRIZZLE_RETURN_OK;
214
215
  }
215
216
  else if (con->result->options & DRIZZLE_RESULT_ROW_BREAK)
216
 
  {
217
 
    con->result->options&= ~int(DRIZZLE_RESULT_ROW_BREAK);
218
 
  }
 
217
    con->result->options&= (drizzle_result_options_t)~DRIZZLE_RESULT_ROW_BREAK;
219
218
  else
220
219
  {
221
220
    con->result->row_count++;