~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Lee Bieber
  • Date: 2011-03-16 18:11:33 UTC
  • mfrom: (2239.2.2 build)
  • Revision ID: kalebral@gmail.com-20110316181133-zr1uj612rz7s32s0
Merge Patrick - Added some randgen test cases
Merge Olaf - refactor includes

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
#include <drizzled/kill.h>
54
54
#include <drizzled/schema.h>
55
55
#include <drizzled/item/subselect.h>
 
56
#include <drizzled/diagnostics_area.h>
 
57
#include <drizzled/table_ident.h>
56
58
 
57
59
#include <limits.h>
58
60
 
246
248
  }
247
249
  case COM_QUIT:
248
250
    /* We don't calculate statistics for this command */
249
 
    session->main_da.disable_status();              // Don't send anything back
 
251
    session->main_da().disable_status();              // Don't send anything back
250
252
    error= true;                                        // End server
251
253
    break;
252
254
  case COM_KILL:
289
291
  }
290
292
 
291
293
  /* If commit fails, we should be able to reset the OK status. */
292
 
  session->main_da.can_overwrite_status= true;
 
294
  session->main_da().can_overwrite_status= true;
293
295
  TransactionServices &transaction_services= TransactionServices::singleton();
294
296
  transaction_services.autocommitOrRollback(*session, session->is_error());
295
 
  session->main_da.can_overwrite_status= false;
 
297
  session->main_da().can_overwrite_status= false;
296
298
 
297
299
  session->transaction.stmt.reset();
298
300
 
300
302
  /* report error issued during command execution */
301
303
  if (session->killed_errno())
302
304
  {
303
 
    if (! session->main_da.is_set())
 
305
    if (! session->main_da().is_set())
304
306
      session->send_kill_message();
305
307
  }
306
308
  if (session->getKilled() == Session::KILL_QUERY || session->getKilled() == Session::KILL_BAD_DATA)
310
312
  }
311
313
 
312
314
  /* Can not be true, but do not take chances in production. */
313
 
  assert(! session->main_da.is_sent);
 
315
  assert(! session->main_da().is_sent);
314
316
 
315
 
  switch (session->main_da.status())
 
317
  switch (session->main_da().status())
316
318
  {
317
319
  case Diagnostics_area::DA_ERROR:
318
320
    /* The query failed, send error to log and abort bootstrap. */
319
 
    session->getClient()->sendError(session->main_da.sql_errno(),
320
 
                               session->main_da.message());
 
321
    session->getClient()->sendError(session->main_da().sql_errno(),
 
322
                               session->main_da().message());
321
323
    break;
322
324
 
323
325
  case Diagnostics_area::DA_EOF:
337
339
    break;
338
340
  }
339
341
 
340
 
  session->main_da.is_sent= true;
 
342
  session->main_da().is_sent= true;
341
343
 
342
344
  session->set_proc_info("closing tables");
343
345
  /* Free tables */