~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/row.cc

  • Committer: Brian Aker
  • Date: 2011-12-08 19:13:17 UTC
  • mfrom: (2466.2.1 drizzle-build)
  • mto: This revision was merged to the branch mainline in revision 2468.
  • Revision ID: brian@tangent.org-20111208191317-05sd4x7o9isc86ag
Update all of libdrizzle per mine and Mark's conversation about how to break out code from interface.

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