~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/change_schema.cc

  • Committer: Stewart Smith
  • Date: 2010-02-15 01:56:32 UTC
  • mto: (1273.13.96 build)
  • mto: This revision was merged to the branch mainline in revision 1308.
  • Revision ID: stewart@flamingspork.com-20100215015632-pm7lnxfq5j5uh8kj
move DATABASE() to function plugin. modify parser so that it looks for a function named 'database' when DATABASE() is called. Special case still needed in parser due to hilarity of not-really-reserved words.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
bool statement::ChangeSchema::execute()
35
35
{
36
36
  Select_Lex *select_lex= &session->lex->select_lex;
 
37
  LEX_STRING db_str= { (char *) select_lex->db, strlen(select_lex->db) };
37
38
 
38
 
  SchemaIdentifier identifier(select_lex->db);
39
 
  if (not mysql_change_db(session, identifier))
 
39
  if (! mysql_change_db(session, &db_str, false))
40
40
  {
41
41
    session->my_ok();
42
42
  }