~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/rename_table.cc

Remove PLUGIN and MODULES.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#include <drizzled/server_includes.h>
 
21
#include "config.h"
22
22
#include <drizzled/show.h>
23
23
#include <drizzled/lock.h>
24
24
#include <drizzled/session.h>
25
25
#include <drizzled/statement/rename_table.h>
 
26
#include "drizzled/sql_table.h"
 
27
#include "drizzled/pthread_globals.h"
26
28
 
27
29
namespace drizzled
28
30
{
151
153
 
152
154
  plugin::StorageEngine *engine= NULL;
153
155
  message::Table table_proto;
154
 
  char path[FN_REFLEN];
155
 
  size_t length;
156
156
 
157
157
  TableIdentifier old_identifier(ren_table->db, old_alias, NO_TMP_TABLE);
158
 
  length= build_table_filename(path, sizeof(path),
159
 
                               ren_table->db, old_alias, false);
160
158
 
161
159
  if (plugin::StorageEngine::getTableDefinition(*session, old_identifier, &table_proto) != EEXIST)
162
160
  {
166
164
 
167
165
  engine= plugin::StorageEngine::findByName(*session, table_proto.engine().name());
168
166
 
169
 
  length= build_table_filename(path, sizeof(path),
170
 
                               new_db, new_alias, false);
171
 
 
172
167
  TableIdentifier new_identifier(new_db, new_alias, NO_TMP_TABLE);
173
168
  if (plugin::StorageEngine::getTableDefinition(*session, new_identifier) != ENOENT)
174
169
  {
197
192
      return ren_table;
198
193
  }
199
194
  return 0;
200
 
 
195
}
201
196
 
202
197
} /* namespace drizzled */