00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #pragma once
00022
00023 #include <drizzled/statement.h>
00024
00025 namespace drizzled
00026 {
00027 class Session;
00028 class TableList;
00029
00030 namespace statement
00031 {
00032
00033 class RenameTable : public Statement
00034 {
00035 public:
00036 RenameTable(Session *in_session) :
00037 Statement(in_session)
00038 {
00039 set_command(SQLCOM_RENAME_TABLE);
00040 }
00041
00042 bool execute();
00043
00044 private:
00045
00046 bool renameTables(TableList *table_list);
00047 TableList *reverseTableList(TableList *table_list);
00048 bool rename(TableList *ren_table,
00049 const char *new_db,
00050 const char *new_table_name,
00051 bool skip_error);
00052 TableList *renameTablesInList(TableList *table_list,
00053 bool skip_error);
00054
00055 };
00056
00057 }
00058
00059 }
00060