~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/show_create_schema.cc

  • Committer: Padraig O'Sullivan
  • Date: 2009-09-13 01:03:01 UTC
  • mto: (1126.9.2 captain-20090915-01)
  • mto: This revision was merged to the branch mainline in revision 1133.
  • Revision ID: osullivan.padraig@gmail.com-20090913010301-tcvvezipx1124acy
Added calls to the dtrace delete begin/end probes.

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/show_create_schema.h>
25
 
#include <drizzled/db.h>
26
 
 
27
 
#include <string>
28
 
 
29
 
using namespace std;
30
 
 
31
 
namespace drizzled
32
 
{
 
25
 
 
26
using namespace drizzled;
33
27
 
34
28
bool statement::ShowCreateSchema::execute()
35
29
{
36
 
  SchemaIdentifier schema_identifier(string(session->lex->name.str, session->lex->name.length));
37
 
 
38
 
  if (not check_db_name(schema_identifier))
 
30
  if (check_db_name(&session->lex->name))
39
31
  {
40
 
    my_error(ER_WRONG_DB_NAME, MYF(0), schema_identifier.getSQLPath().c_str());
 
32
    my_error(ER_WRONG_DB_NAME, MYF(0), session->lex->name.str);
41
33
    return false;
42
34
  }
43
 
  bool res= mysqld_show_create_db(*session, schema_identifier,
44
 
                                  is_if_not_exists);
 
35
  bool res= mysqld_show_create_db(session, session->lex->name.str,
 
36
                                  session->lex->create_info.options &
 
37
                                  HA_LEX_CREATE_IF_NOT_EXISTS);
45
38
  return res;
46
39
}
47
 
 
48
 
} /* namespace drizzled */