~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle-1.0/query.cc

Fix merge issues with 1.0 CC fix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
{
98
98
  if (query == NULL)
99
99
  {
100
 
    query= malloc(sizeof(drizzle_query_st));
 
100
    query= new (std::nothrow) drizzle_query_st;
101
101
    if (query == NULL)
102
102
    {
103
103
      drizzle_set_error(drizzle, "drizzle_query_create", "malloc");
181
181
 
182
182
drizzle_query_options_t drizzle_query_options(drizzle_query_st *query)
183
183
{
184
 
  return query->options;
 
184
  return drizzle_query_options_t(query->options);
185
185
}
186
186
 
187
187
void drizzle_query_set_options(drizzle_query_st *query,
259
259
drizzle_query_st *drizzle_query_run(drizzle_st *drizzle,
260
260
                                    drizzle_return_t *ret_ptr)
261
261
{
262
 
  drizzle_options_t options;
 
262
  int options;
263
263
  drizzle_query_st *query;
264
264
  drizzle_con_st *con;
265
265
 
269
269
    return NULL;
270
270
  }
271
271
 
272
 
  options= drizzle->options;
273
 
  drizzle->options|= DRIZZLE_NON_BLOCKING;
 
272
  options= int(drizzle->options);
 
273
  drizzle->options|= int(DRIZZLE_NON_BLOCKING);
274
274
 
275
275
  /* Check to see if any queries need to be started. */
276
276
  if (drizzle->query_new > 0)
290
290
      {
291
291
        assert(query->state == DRIZZLE_QUERY_STATE_DONE);
292
292
        drizzle->query_running--;
293
 
        drizzle->options= options;
 
293
        drizzle->options= int(options);
294
294
        query->con->query= NULL;
295
295
        if (*ret_ptr == DRIZZLE_RETURN_ERROR_CODE || *ret_ptr == DRIZZLE_RETURN_OK)
296
296
        {