~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-08-04 08:13:04 UTC
  • mfrom: (2384 drizzle)
  • mto: This revision was merged to the branch mainline in revision 2385.
  • Revision ID: olafvdspek@gmail.com-20110804081304-rlejjpvoos17bjdf
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
  unsigned long ulong_num;
130
130
  uint64_t ulonglong_number;
131
131
  int64_t longlong_number;
132
 
  drizzled::LEX_STRING lex_str;
133
 
  drizzled::LEX_STRING *lex_str_ptr;
 
132
  drizzled::lex_string_t lex_str;
 
133
  drizzled::lex_string_t *lex_str_ptr;
134
134
  drizzled::LEX_SYMBOL symbol;
135
135
  drizzled::Table_ident *table;
136
136
  char *simple_string;
1211
1211
        ;
1212
1212
 
1213
1213
opt_constraint:
1214
 
          /* empty */ { $$= null_lex_str; }
 
1214
          /* empty */ { $$= null_lex_string(); }
1215
1215
        | constraint { $$= $1; }
1216
1216
        ;
1217
1217
 
1795
1795
        ;
1796
1796
 
1797
1797
opt_ident:
1798
 
          /* empty */ { $$= null_lex_str; }
 
1798
          /* empty */ { $$= null_lex_string(); }
1799
1799
        | field_ident { $$= $1; }
1800
1800
        ;
1801
1801
 
1802
1802
opt_component:
1803
 
          /* empty */    { $$= null_lex_str; }
 
1803
          /* empty */    { $$= null_lex_string(); }
1804
1804
        | '.' ident      { $$= $2; }
1805
1805
        ;
1806
1806
 
1916
1916
            Lex.length= Lex.dec=0;
1917
1917
            Lex.type= 0;
1918
1918
            statement->default_value= statement->on_update_value= 0;
1919
 
            statement->comment= null_lex_str;
 
1919
            statement->comment= null_lex_string();
1920
1920
            Lex.charset= NULL;
1921
1921
            statement->alter_info.flags.set(ALTER_CHANGE_COLUMN);
1922
1922
            statement->column_format= COLUMN_FORMAT_TYPE_DEFAULT;
2363
2363
        ;
2364
2364
 
2365
2365
select_alias:
2366
 
          /* empty */ { $$=null_lex_str;}
 
2366
          /* empty */ { $$= null_lex_string();}
2367
2367
        | AS ident { $$=$2; }
2368
2368
        | AS TEXT_STRING_sys { $$=$2; }
2369
2369
        | ident { $$=$1; }
3000
3000
            }
3001
3001
          }
3002
3002
        | IF '(' expr ',' expr ',' expr ')'
3003
 
          { $$= new (YYSession->mem_root) Item_func_if($3,$5,$7); }
 
3003
          { 
 
3004
            $$= new (YYSession->mem_root) Item_func_if($3,$5,$7);
 
3005
          }
3004
3006
        | KILL_SYM kill_option '(' expr ')'
3005
3007
          {
3006
3008
            List<Item> *args= new (YYSession->mem_root) List<Item>;
3885
3887
          /* empty */ { $$=0; }
3886
3888
        | table_alias ident
3887
3889
          {
3888
 
            $$= (drizzled::LEX_STRING*) memory::sql_memdup(&$2,sizeof(drizzled::LEX_STRING));
 
3890
            $$= (drizzled::lex_string_t*) memory::sql_memdup(&$2,sizeof(drizzled::lex_string_t));
3889
3891
          }
3890
3892
        ;
3891
3893
 
5061
5063
table_wild:
5062
5064
          ident '.' '*'
5063
5065
          {
5064
 
            $$= parser::buildTableWild(&Lex, NULL_LEX_STRING, $1);
 
5066
            $$= parser::buildTableWild(&Lex, null_lex_string(), $1);
5065
5067
          }
5066
5068
        | ident '.' ident '.' '*'
5067
5069
          {
5076
5078
simple_ident:
5077
5079
          ident
5078
5080
          {
5079
 
            $$= parser::buildIdent(&Lex, NULL_LEX_STRING, NULL_LEX_STRING, $1);
 
5081
            $$= parser::buildIdent(&Lex, null_lex_string(), null_lex_string(), $1);
5080
5082
          }
5081
5083
        | simple_ident_q { $$= $1; }
5082
5084
        ;
5084
5086
simple_ident_q:
5085
5087
          ident '.' ident
5086
5088
          {
5087
 
            $$= parser::buildIdent(&Lex, NULL_LEX_STRING, $1, $3);
 
5089
            $$= parser::buildIdent(&Lex, null_lex_string(), $1, $3);
5088
5090
          }
5089
5091
        | '.' ident '.' ident
5090
5092
          {
5091
 
            $$= parser::buildIdent(&Lex, NULL_LEX_STRING, $2, $4);
 
5093
            $$= parser::buildIdent(&Lex, null_lex_string(), $2, $4);
5092
5094
          }
5093
5095
        | ident '.' ident '.' ident
5094
5096
          {
5110
5112
          }
5111
5113
        | ident '.' ident
5112
5114
          {
5113
 
            if (not parser::checkFieldIdent(&Lex, NULL_LEX_STRING, $1))
 
5115
            if (not parser::checkFieldIdent(&Lex, null_lex_string(), $1))
5114
5116
              DRIZZLE_YYABORT;
5115
5117
 
5116
5118
            $$=$3;
5447
5449
            Lex.option_type= $1;
5448
5450
            Lex.var_list.push_back(SetVarPtr(new set_var(Lex.option_type,
5449
5451
                                              find_sys_var("tx_isolation"),
5450
 
                                              &null_lex_str,
 
5452
                                              &(null_lex_string()),
5451
5453
                                              new Item_int((int32_t)
5452
5454
                                              $5))));
5453
5455
          }
5489
5491
              if (!tmp)
5490
5492
                DRIZZLE_YYABORT;
5491
5493
              $$.var= tmp;
5492
 
              $$.base_name= null_lex_str;
 
5494
              $$.base_name= null_lex_string();
5493
5495
            }
5494
5496
          }
5495
5497
        ;