~drizzle-trunk/libdrizzle/jenkins-Libdrizzle-6

« back to all changes in this revision

Viewing changes to libdrizzle/result.cc

  • Committer: Andrew Hutchings
  • Date: 2012-12-19 12:44:26 UTC
  • mfrom: (50.1.2 libdrizzle-5.1)
  • Revision ID: andrew@linuxjedi.co.uk-20121219124426-8fk29z8u5p24inly
Merge in C++ compiling

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
    return NULL;
56
56
  }
57
57
 
58
 
  result= malloc(sizeof(drizzle_result_st));
 
58
  result= (drizzle_result_st*)malloc(sizeof(drizzle_result_st));
59
59
  if (result == NULL)
60
60
  {
61
61
    drizzle_set_error(con->drizzle, __func__, "Failed to allocate.");
409
409
    /* We can ignore the returns since we've buffered the entire packet. */
410
410
    con->result->affected_rows= drizzle_unpack_length(con, &ret);
411
411
    con->result->insert_id= drizzle_unpack_length(con, &ret);
412
 
    con->status= drizzle_get_byte2(con->buffer_ptr);
413
 
    con->result->warning_count= drizzle_get_byte2(con->buffer_ptr + 2);
 
412
    con->status= (drizzle_con_status_t)drizzle_get_byte2(con->buffer_ptr);
 
413
    con->result->warning_count= drizzle_get_byte2(con->buffer_ptr +2);
414
414
    con->buffer_ptr+= 4;
415
415
    con->buffer_size-= 5;
416
416
    con->packet_size-= 5;
427
427
  {
428
428
    con->result->options= DRIZZLE_RESULT_EOF_PACKET;
429
429
    con->result->warning_count= drizzle_get_byte2(con->buffer_ptr + 1);
430
 
    con->status= drizzle_get_byte2(con->buffer_ptr + 3);
 
430
    con->status= (drizzle_con_status_t)drizzle_get_byte2(con->buffer_ptr + 3);
431
431
    con->buffer_ptr+= 5;
432
432
    con->buffer_size-= 5;
433
433
    con->packet_size-= 5;