~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/drop_table.cc

  • Committer: Brian Aker
  • Date: 2010-02-25 07:54:52 UTC
  • mfrom: (1273.13.101 build)
  • Revision ID: brian@gaz-20100225075452-19eozreshbrerypu
Merge of all patches in build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include <drizzled/session.h>
24
24
#include <drizzled/lock.h>
25
25
#include <drizzled/statement/drop_table.h>
26
 
#include <drizzled/plugin/info_schema_table.h>
27
26
#include "drizzled/sql_table.h"
28
27
 
29
28
namespace drizzled
58
57
{
59
58
  bool error, need_start_waiting= false;
60
59
 
61
 
  /**
62
 
   * @todo this is a result of retaining the behavior that was here before. This should be removed
63
 
   * and the correct error handling should be done in doDropTable for the I_S engine. There is an
64
 
   * issue here with dropping tables with the same name as an I_S table. How do we know if we are
65
 
   * attemping to drop an I_S table or a regular table with the same name as an I_S table? For now,
66
 
   * we simply check if the current database is information_schema
67
 
   */
68
 
  plugin::InfoSchemaTable *sch_table= plugin::InfoSchemaTable::getTable(tables->table_name);
69
 
  if (sch_table &&
70
 
      session->db.compare(INFORMATION_SCHEMA_NAME) == 0)
71
 
  {
72
 
    my_error(ER_DBACCESS_DENIED_ERROR, MYF(0), "", "", INFORMATION_SCHEMA_NAME.c_str());
73
 
    return true;
74
 
  }
75
 
 
76
60
  /* mark for close and remove all cached entries */
77
61
 
78
62
  if (! drop_temporary)