~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Mark Atwood
  • Date: 2011-12-15 23:13:18 UTC
  • mfrom: (2465.3.1 rf3)
  • Revision ID: me@mark.atwood.name-20111215231318-mt2y2q4s5ydp79q3
mergeĀ lp:~olafvdspek/drizzle/refactor14

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include <drizzled/abort_exception.h>
22
22
#include <drizzled/error.h>
23
23
#include <drizzled/nested_join.h>
24
 
#include <drizzled/query_id.h>
25
24
#include <drizzled/transaction_services.h>
26
25
#include <drizzled/sql_parse.h>
27
26
#include <drizzled/data_home.h>
88
87
extern size_t my_thread_stack_size;
89
88
extern const charset_info_st *character_set_filesystem;
90
89
 
 
90
static atomic<uint64_t> g_query_id;
 
91
 
91
92
namespace
92
93
{
93
94
  static const std::string command_name[]=
192
193
                      const char* packet, uint32_t packet_length)
193
194
{
194
195
  bool error= false;
195
 
  Query_id& query_id= Query_id::get_query_id();
196
196
 
197
197
  DRIZZLE_COMMAND_START(session->thread_id, command);
198
198
 
199
199
  session->command= command;
200
200
  session->lex().sql_command= SQLCOM_END; /* to avoid confusing VIEW detectors */
201
201
  session->times.set_time();
202
 
  session->setQueryId(query_id.value());
 
202
  session->setQueryId(g_query_id.increment());
203
203
 
204
204
  if (command != COM_PING)
205
205
  {
206
206
    // Increase id and count all other statements
207
207
    session->status_var.questions++;
208
 
    query_id.next();
209
208
  }
210
209
 
211
210
  /* @todo set session->lex().sql_command to SQLCOM_END here */