~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle-1.0/row.c

  • Committer: Brian Aker
  • Date: 2011-11-04 21:06:16 UTC
  • mto: This revision was merged to the branch mainline in revision 2450.
  • Revision ID: brian@tangent.org-20111104210616-2at42agch94dkwb0
Additional fixes for libdrizzle.

Show diffs side-by-side

added added

removed removed

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