~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

Merge in catalog updates. This also fixes a bug in schema encoding.

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
#include <drizzled/plugin/catalog.h>
24
27
 
25
28
namespace drizzled
26
29
{
36
39
{
37
40
}
38
41
 
39
 
bool Create::authorized()
 
42
bool Create::authorized() const
40
43
{
 
44
  if (getSession()->getClient()->isConsole())
 
45
  {
 
46
    return true;
 
47
  }
 
48
 
41
49
  my_error(ER_CATALOG_CANNOT_CREATE_PERMISSION, identifier());
 
50
 
42
51
  return false;
43
52
}
44
53
 
 
54
bool Create::perform() const
 
55
{
 
56
  return plugin::Catalog::create(identifier());
 
57
}
 
58
 
45
59
} /* namespace catalog */
46
60
} /* namespace statement */
47
61
} /* namespace drizzled */