~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/row.cc

  • Committer: Mark Atwood
  • Date: 2011-12-15 23:13:18 UTC
  • mfrom: (2465.3.1 rf3)
  • Revision ID: me@mark.atwood.name-20111215231318-mt2y2q4s5ydp79q3
mergeĀ lp:~olafvdspek/drizzle/refactor14

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 * @brief Row definitions
40
40
 */
41
41
 
42
 
#include "common.h"
 
42
#include <libdrizzle-1.0/common.h>
43
43
 
44
44
/*
45
45
 * Client definitions
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++;