~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

Updates based on code review from Jay.

- modified the SqlCommand base class to be abstract
- created new directory (command) where each command implementation will be
  placed in a separate file
- created namespace for various commands (drizzled::command)

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
#include <drizzled/connect.h>
37
37
#include <drizzled/lock.h>
38
38
#include <drizzled/select_send.h>
39
 
#include <drizzled/sql_commands.h>
 
39
#include <drizzled/command.h>
40
40
 
41
41
#include <bitset>
42
42
#include <algorithm>
1330
1330
   */
1331
1331
  if (comm_not_executed)
1332
1332
  {
1333
 
    /*
1334
 
     * Add needed information to the command object that will
1335
 
     * be executed. Since we do not know until runtime what the
1336
 
     * type of command to be executed is, we add this information
1337
 
     * to every command even though it may not need or use it.
1338
 
     */
1339
 
    lex->command->setShowLock(&LOCK_status);
1340
 
    lex->command->setTableList(all_tables);
1341
 
    lex->command->setFirstTable(first_table);
1342
 
    lex->command->setNeedStartWaiting(&need_start_waiting);
1343
 
 
1344
1333
    /* now we are ready to execute the command */
1345
1334
    res= lex->command->execute();
1346
1335
  }