~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/change_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/change_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::ChangeSchema::execute()
35
29
{
36
30
  Select_Lex *select_lex= &session->lex->select_lex;
 
31
  LEX_STRING db_str= { (char *) select_lex->db, strlen(select_lex->db) };
37
32
 
38
 
  SchemaIdentifier identifier(select_lex->db);
39
 
  if (not mysql_change_db(session, identifier))
 
33
  if (! mysql_change_db(session, &db_str, false))
40
34
  {
41
35
    session->my_ok();
42
36
  }
43
37
 
44
38
  return false;
45
39
}
46
 
 
47
 
}