~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

  • Committer: Olaf van der Spek
  • Date: 2011-10-14 10:56:52 UTC
  • mto: This revision was merged to the branch mainline in revision 2438.
  • Revision ID: olafvdspek@gmail.com-20111014105652-3089oith2v1n3uwr
Add const

Show diffs side-by-side

added added

removed removed

Lines of Context:
1829
1829
 
1830
1830
            Lex.col_list.clear();
1831
1831
            Lex.select_lex.init_order();
1832
 
            Lex.select_lex.db= const_cast<char*>(((TableList*) Lex.select_lex.table_list.first)->getSchemaName());
 
1832
            Lex.select_lex.db= ((TableList*) Lex.select_lex.table_list.first)->getSchemaName();
1833
1833
          }
1834
1834
          alter_commands
1835
1835
          {}
1915
1915
        | CHANGE_SYM opt_column field_ident
1916
1916
          {
1917
1917
            statement::AlterTable *statement= (statement::AlterTable *)Lex.statement;
1918
 
            statement->change= (char*)$3.data();
 
1918
            statement->change= $3.data();
1919
1919
            statement->alter_info.flags.set(ALTER_CHANGE_COLUMN);
1920
1920
          }
1921
1921
          field_spec opt_place
2005
2005
        | RENAME opt_to table_ident
2006
2006
          {
2007
2007
            statement::AlterTable *statement= (statement::AlterTable *)Lex.statement;
2008
 
            Lex.select_lex.db= (char*)$3->db.data();
 
2008
            Lex.select_lex.db= $3->db.data();
2009
2009
            if (not Lex.select_lex.db)
2010
2010
            {
2011
2011
              str_ref db = Lex.session->copy_db_to();
4744
4744
          USE_SYM schema_name
4745
4745
          {
4746
4746
            Lex.statement= new statement::ChangeSchema(YYSession);
4747
 
            Lex.select_lex.db= (char*)$2.data();
 
4747
            Lex.select_lex.db= $2.data();
4748
4748
          }
4749
4749
        ;
4750
4750
 
4916
4916
        }
4917
4917
        | text_literal TEXT_STRING_literal
4918
4918
          {
4919
 
            ((Item_string*) $1)->append((char*)$2.data(), $2.size());
 
4919
            ((Item_string*) $1)->append($2);
4920
4920
          }
4921
4921
        ;
4922
4922