~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/drop_schema.cc

  • Committer: Stewart Smith
  • Date: 2009-12-02 06:01:21 UTC
  • mto: (1237.1.2 push)
  • mto: This revision was merged to the branch mainline in revision 1238.
  • Revision ID: stewart@flamingspork.com-20091202060121-68gyfqifqcjcmi2v
my_end() no longer requires an argument (we removed them all)

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#include "config.h"
 
21
#include <drizzled/server_includes.h>
22
22
#include <drizzled/show.h>
23
23
#include <drizzled/session.h>
24
24
#include <drizzled/statement/drop_schema.h>
25
 
#include <drizzled/db.h>
26
 
 
27
 
#include <string>
28
 
 
29
 
using namespace std;
30
25
 
31
26
namespace drizzled
32
27
{
37
32
  {
38
33
    return true;
39
34
  }
40
 
  SchemaIdentifier schema_identifier(string(session->lex->name.str, session->lex->name.length));
41
 
  if (not check_db_name(schema_identifier))
 
35
  if (check_db_name(&session->lex->name))
42
36
  {
43
 
    my_error(ER_WRONG_DB_NAME, MYF(0), schema_identifier.getSQLPath().c_str());
 
37
    my_error(ER_WRONG_DB_NAME, MYF(0), session->lex->name.str);
44
38
    return false;
45
39
  }
46
40
  if (session->inTransaction())
50
44
        MYF(0));
51
45
    return true;
52
46
  }
53
 
  bool res= mysql_rm_db(session, schema_identifier, drop_if_exists);
54
 
 
 
47
  bool res= mysql_rm_db(session, session->lex->name.str, drop_if_exists);
55
48
  return res;
56
49
}
57
50