~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/catalog/drop.cc

  • Committer: Brian Aker
  • Date: 2011-01-24 04:10:04 UTC
  • mto: (2109.2.1 drizzle-build)
  • mto: This revision was merged to the branch mainline in revision 2111.
  • Revision ID: brian@tangent.org-20110124041004-ze833jg5bi2fbd41
Merge in update to use console for catalog DDL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include "config.h"
22
22
 
23
23
#include <drizzled/statement/catalog.h>
 
24
#include <drizzled/plugin/client.h>
 
25
#include <drizzled/session.h>
 
26
 
 
27
#include <drizzled/plugin/catalog.h>
24
28
 
25
29
namespace drizzled
26
30
{
36
40
{
37
41
}
38
42
 
39
 
bool Drop::authorized()
 
43
bool Drop::authorized() const
40
44
{
 
45
  if (getSession()->getClient()->isConsole())
 
46
  {
 
47
    return true;
 
48
  }
 
49
 
41
50
  my_error(ER_CATALOG_CANNOT_DROP_PERMISSION, identifier());
42
51
  return false;
43
52
}
44
53
 
 
54
bool Drop::perform() const
 
55
{
 
56
  return plugin::Catalog::drop(identifier::Catalog(identifier()));
 
57
}
 
58
 
45
59
} /* namespace catalog */
46
60
} /* namespace statement */
47
61
} /* namespace drizzled */