~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

  • Committer: Brian Aker
  • Date: 2011-02-26 22:07:48 UTC
  • mto: This revision was merged to the branch mainline in revision 2204.
  • Revision ID: brian@tangent.org-20110226220748-pfxcq4c572lv1jdd
Merge fix such that default is better defined on numbers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
659
659
        predicate bit_expr
660
660
        table_wild simple_expr udf_expr
661
661
        expr_or_default set_expr_or_default
662
 
        signed_literal opt_escape
 
662
        opt_escape
 
663
        signed_literal
 
664
        integer_literal
663
665
        date_literal
664
666
        boolean_literal
665
667
        simple_ident_q
1496
1498
          {
1497
1499
            (void)parser::buildSerialColumn(Lex);
1498
1500
          }
1499
 
        | DEFAULT signed_literal
 
1501
        | DEFAULT integer_literal
1500
1502
          {
1501
1503
            statement::AlterTable *statement= (statement::AlterTable *)Lex->statement;
1502
1504
 
4933
4935
        | TIMESTAMP_SYM text_literal { $$ = $2; }
4934
4936
        ;
4935
4937
 
 
4938
integer_literal:
 
4939
          text_literal { $$ = $1; }
 
4940
        | HEX_NUM { $$ = new Item_hex_string($1.str, $1.length);}
 
4941
        | BIN_NUM { $$= new Item_bin_string($1.str, $1.length); }
 
4942
        | NUM_literal { $$ = $1; }
 
4943
        | NULL_SYM
 
4944
          {
 
4945
            $$ = new Item_null();
 
4946
            YYSession->m_lip->next_state=MY_LEX_OPERATOR_OR_IDENT;
 
4947
          }
 
4948
        | '+' NUM_literal { $$ = $2; }
 
4949
        | '-' NUM_literal
 
4950
          {
 
4951
            $2->max_length++;
 
4952
            $$= $2->neg();
 
4953
          }
 
4954
        ;
 
4955
 
4936
4956
boolean_literal:
4937
4957
          NULL_SYM
4938
4958
          {