~drizzle-developers/drizzle/elliott-release

« back to all changes in this revision

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

  • Committer: Patrick Crews
  • Date: 2011-02-01 20:33:06 UTC
  • mfrom: (1845.2.288 drizzle)
  • Revision ID: gleebix@gmail.com-20110201203306-mwq2rk0it81tlwxh
Merged Trunk

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 */