~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/drop_schema.cc

  • Committer: Mark Atwood
  • Date: 2011-10-14 15:59:08 UTC
  • mfrom: (2430.1.12 refactor3a)
  • Revision ID: me@mark.atwood.name-20111014155908-whqmrmaf2grpsg5c
mergeĀ lp:~olafvdspek/drizzle/refactor3

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
using namespace std;
33
33
 
34
 
namespace drizzled
35
 
{
 
34
namespace drizzled {
36
35
 
37
36
bool statement::DropSchema::execute()
38
37
{
42
41
    return true;
43
42
  }
44
43
 
45
 
  identifier::Schema schema_identifier(std::string(lex().name.str, lex().name.length));
 
44
  identifier::Schema schema_identifier(to_string(lex().name));
46
45
 
47
46
  if (not schema::check(session(), schema_identifier))
48
47
  {
49
48
    my_error(ER_WRONG_DB_NAME, schema_identifier);
50
 
 
51
49
    return false;
52
50
  }
53
51
 
54
52
  if (session().inTransaction())
55
53
  {
56
 
    my_message(ER_LOCK_OR_ACTIVE_TRANSACTION, 
57
 
        ER(ER_LOCK_OR_ACTIVE_TRANSACTION), 
58
 
        MYF(0));
 
54
    my_message(ER_LOCK_OR_ACTIVE_TRANSACTION, ER(ER_LOCK_OR_ACTIVE_TRANSACTION), MYF(0));
59
55
    return true;
60
56
  }
61
57
  
80
76
}
81
77
 
82
78
} /* namespace drizzled */
83