~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/change_schema.cc

pandora-build v0.71. Added check for avahi.

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
25
 
31
26
namespace drizzled
32
27
{
34
29
bool statement::ChangeSchema::execute()
35
30
{
36
31
  Select_Lex *select_lex= &session->lex->select_lex;
 
32
  LEX_STRING db_str= { (char *) select_lex->db, strlen(select_lex->db) };
37
33
 
38
 
  SchemaIdentifier identifier(select_lex->db);
39
 
  if (not mysql_change_db(session, identifier))
 
34
  if (! mysql_change_db(session, &db_str, false))
40
35
  {
41
36
    session->my_ok();
42
37
  }