~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/conn.c

updating

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
  if (con->fd == -1)
87
87
    return;
88
88
 
89
 
  (void)close(con->fd);
 
89
  (void)closesocket(con->fd);
90
90
  con->fd= -1;
91
91
 
92
92
  con->options&= (drizzle_con_options_t)~DRIZZLE_CON_READY;
195
195
 
196
196
  /* If asking for the experimental Drizzle protocol, clean the MySQL flag. */
197
197
  if (con->options & DRIZZLE_CON_EXPERIMENTAL)
 
198
  {
198
199
    con->options&= (drizzle_con_options_t)~DRIZZLE_CON_MYSQL;
 
200
  }
199
201
}
200
202
 
201
203
void drizzle_con_remove_options(drizzle_con_st *con,
451
453
  return drizzle_con_shutdown(con, result, ret_ptr);
452
454
}
453
455
 
 
456
drizzle_result_st *drizzle_kill(drizzle_con_st *con,
 
457
                                drizzle_result_st *result,
 
458
                                uint32_t query_id,
 
459
                                drizzle_return_t *ret_ptr)
 
460
{
 
461
  uint32_t sent= htonl(query_id);
 
462
  return drizzle_con_command_write(con, result, DRIZZLE_COMMAND_PROCESS_KILL,
 
463
                                   &sent, sizeof(uint32_t), sizeof(uint32_t), ret_ptr);
 
464
}
 
465
 
454
466
drizzle_result_st *drizzle_con_ping(drizzle_con_st *con,
455
467
                                    drizzle_result_st *result,
456
468
                                    drizzle_return_t *ret_ptr)
666
678
  size_t offset= 0;
667
679
  size_t size= 0;
668
680
 
669
 
  command_data= drizzle_con_command_read(con, command, &offset, &size, total,
670
 
                                         ret_ptr);
 
681
  command_data= drizzle_con_command_read(con, command, &offset, &size, total, ret_ptr);
671
682
  if (*ret_ptr != DRIZZLE_RETURN_OK)
672
683
    return NULL;
673
684