~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Brian Aker
  • Date: 2009-08-06 15:04:21 UTC
  • mfrom: (1093.1.52 captain)
  • Revision ID: brian@gaz-20090806150421-w8yrasl1m8exorxs
Merge Jay

Show diffs side-by-side

added added

removed removed

Lines of Context:
486
486
 
487
487
 
488
488
  switch (lex->sql_command) {
489
 
  case SQLCOM_EMPTY_QUERY:
490
 
    session->my_ok();
491
 
    break;
492
 
 
493
 
  case SQLCOM_SHOW_WARNS:
494
 
  {
495
 
    res= mysqld_show_warnings(session, (uint32_t)
496
 
                              ((1L << (uint32_t) DRIZZLE_ERROR::WARN_LEVEL_NOTE) |
497
 
                               (1L << (uint32_t) DRIZZLE_ERROR::WARN_LEVEL_WARN) |
498
 
                               (1L << (uint32_t) DRIZZLE_ERROR::WARN_LEVEL_ERROR)
499
 
                               ));
500
 
    break;
501
 
  }
502
 
  case SQLCOM_SHOW_ERRORS:
503
 
  {
504
 
    res= mysqld_show_warnings(session, (uint32_t)
505
 
                              (1L << (uint32_t) DRIZZLE_ERROR::WARN_LEVEL_ERROR));
506
 
    break;
507
 
  }
508
 
  case SQLCOM_SHOW_ENGINE_STATUS:
509
 
    {
510
 
      res = ha_show_status(session, lex->show_engine, HA_ENGINE_STATUS);
511
 
      break;
512
 
    }
513
489
  case SQLCOM_CREATE_TABLE:
514
490
  {
515
491
    /* If CREATE TABLE of non-temporary table, do implicit commit */
769
745
    }
770
746
    break;
771
747
  }
772
 
  case SQLCOM_SHOW_CREATE:
773
 
    assert(first_table == all_tables && first_table != 0);
774
 
    {
775
 
      res= drizzled_show_create(session, first_table);
776
 
      break;
777
 
    }
778
 
  case SQLCOM_CHECKSUM:
779
 
  {
780
 
    assert(first_table == all_tables && first_table != 0);
781
 
    res = mysql_checksum_table(session, first_table, &lex->check_opt);
782
 
    break;
783
 
  }
784
748
  case SQLCOM_CHECK:
785
749
  {
786
750
    assert(first_table == all_tables && first_table != 0);
957
921
    res= mysql_rm_table(session, first_table, lex->drop_if_exists, lex->drop_temporary);
958
922
  }
959
923
  break;
960
 
  case SQLCOM_SHOW_PROCESSLIST:
961
 
    mysqld_list_processes(session, NULL, lex->verbose);
962
 
    break;
963
924
  case SQLCOM_CHANGE_DB:
964
925
  {
965
926
    LEX_STRING db_str= { (char *) select_lex->db, strlen(select_lex->db) };
969
930
 
970
931
    break;
971
932
  }
972
 
 
973
 
  case SQLCOM_LOAD:
974
 
  {
975
 
    assert(first_table == all_tables && first_table != 0);
976
 
    res= mysql_load(session, lex->exchange, first_table, lex->field_list,
977
 
                    lex->update_list, lex->value_list, lex->duplicates, lex->ignore);
978
 
    break;
979
 
  }
980
 
 
981
933
  case SQLCOM_SET_OPTION:
982
934
  {
983
935
    List<set_var_base> *lex_var_list= &lex->var_list;
1134
1086
      goto error;
1135
1087
    session->my_ok();
1136
1088
    break;
1137
 
  case SQLCOM_COMMIT:
1138
 
    if (! session->endTransaction(lex->tx_release ? COMMIT_RELEASE : lex->tx_chain ? COMMIT_AND_CHAIN : COMMIT))
1139
 
      goto error;
1140
 
    session->my_ok();
1141
 
    break;
1142
 
  case SQLCOM_ROLLBACK:
1143
 
    if (! session->endTransaction(lex->tx_release ? ROLLBACK_RELEASE : lex->tx_chain ? ROLLBACK_AND_CHAIN : ROLLBACK))
1144
 
      goto error;
1145
 
    session->my_ok();
1146
 
    break;
1147
1089
  case SQLCOM_RELEASE_SAVEPOINT:
1148
1090
  {
1149
1091
    SAVEPOINT *sv;
1250
1192
  }
1251
1193
  /*
1252
1194
   * The following conditional statement is only temporary until
1253
 
   * the mongo switch statement that occurs afterwards has been
 
1195
   * the mongo switch statement that occurs above has been
1254
1196
   * fully removed. Once that switch statement is gone, every
1255
1197
   * command will have its own class and we won't need this
1256
1198
   * check.