~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/change_schema.cc

  • Committer: Brian Aker
  • Date: 2009-10-15 00:22:33 UTC
  • mto: (1183.1.11 merge)
  • mto: This revision was merged to the branch mainline in revision 1198.
  • Revision ID: brian@gaz-20091015002233-fa4ao2mbc67wls91
First pass of information engine. OMG, ponies... is it so much easier to
deal with creating and engine.

The list table iterator though... its ass, needs to go. We should also
abstract out share. Very few engines need a custom one. Just say'in

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
 
}