~linuxjedi/libdrizzle/5.1-prep-stmt-cleanup

« back to all changes in this revision

Viewing changes to libdrizzle/row.cc

  • Committer: Andrew Hutchings
  • Date: 2012-12-22 08:55:58 UTC
  • mfrom: (43.2.18 5.0)
  • Revision ID: andrew@linuxjedi.co.uk-20121222085558-b3aj47q2ah3cfccg
Merge 5.0 into 5.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
 
64
64
  if ((result->column_current != result->column_count) && (!(result->options & DRIZZLE_RESULT_BUFFER_COLUMN)))
65
65
  {
66
 
    drizzle_con_set_error(result->con, "drizzle_row_read", "cannot retrieve rows until all columns are retrieved");
 
66
    drizzle_set_error(result->con, "drizzle_row_read", "cannot retrieve rows until all columns are retrieved");
67
67
    *ret_ptr= DRIZZLE_RETURN_NOT_READY;
68
68
    return 0;
69
69
  }
108
108
    result->row= (drizzle_row_t)realloc(NULL, (sizeof(drizzle_field_t) + sizeof(size_t)) * result->column_count);
109
109
    if (result->row == NULL)
110
110
    {
111
 
      drizzle_con_set_error(result->con, __func__, "Failed to allocate.");
 
111
      drizzle_set_error(result->con, __func__, "Failed to allocate.");
112
112
      *ret_ptr= DRIZZLE_RETURN_MEMORY;
113
113
      return NULL;
114
114
    }
242
242
 * Internal state functions.
243
243
 */
244
244
 
245
 
drizzle_return_t drizzle_state_row_read(drizzle_con_st *con)
 
245
drizzle_return_t drizzle_state_row_read(drizzle_st *con)
246
246
{
247
247
  if (con == NULL)
248
248
  {
263
263
    /* Got EOF packet, no more rows. */
264
264
    con->result->row_current= 0;
265
265
    con->result->warning_count= drizzle_get_byte2(con->buffer_ptr + 1);
266
 
    con->status= (drizzle_con_status_t)drizzle_get_byte2(con->buffer_ptr + 3);
 
266
    con->status= (drizzle_status_t)drizzle_get_byte2(con->buffer_ptr + 3);
267
267
    con->buffer_ptr+= 5;
268
268
    con->buffer_size-= 5;
269
269
  }