1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 Sun Microsystems, Inc.
4
* Copyright (C) 2008 Sun Microsystems
6
6
* This program is free software; you can redistribute it and/or modify
7
7
* it under the terms of the GNU General Public License as published by
24
#include <drizzled/message/schema.h>
29
namespace message { class Schema; }
30
namespace identifier { class Schema; }
32
bool create_db(Session *session, const message::Schema &schema_message, const bool is_if_not_exists);
33
bool alter_db(Session *session, const message::Schema &schema_message, const message::schema::shared_ptr &original_schema);
34
bool rm_db(Session *session, identifier::Schema &identifier, const bool if_exists);
35
bool change_db(Session *session, identifier::Schema &identifier);
37
} /* namespace drizzled */
39
#endif /* DRIZZLED_DB_H */
21
#ifndef DRIZZLE_SERVER_DB_H
22
#define DRIZZLE_SERVER_DB_H
24
int mysql_create_db(Session *session, char *db, HA_CREATE_INFO *create, bool silent);
25
bool mysql_alter_db(Session *session, const char *db, HA_CREATE_INFO *create);
26
bool mysql_rm_db(Session *session,char *db,bool if_exists, bool silent);
27
bool mysql_change_db(Session *session, const LEX_STRING *new_db_name,
29
bool mysql_opt_change_db(Session *session,
30
const LEX_STRING *new_db_name,
31
LEX_STRING *saved_db_name,
33
bool *cur_db_changed);
36
bool check_db_dir_existence(const char *db_name);
37
int load_db_opt_by_name(Session *session, const char *db_name,
38
HA_CREATE_INFO *db_create_info);
39
const CHARSET_INFO *get_default_db_collation(Session *session, const char *db_name);
41
extern int creating_database; // How many database locks are made
42
extern int creating_table; // How many mysql_create_table() are running