~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

  • Committer: Brian Aker
  • Date: 2010-12-28 04:57:17 UTC
  • mfrom: (2035.2.2 bool)
  • Revision ID: brian@tangent.org-20101228045717-6ax27qw6122h50sf
Merge in boolean.

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
class Item;
83
83
class Item_num;
84
84
 
 
85
namespace item
 
86
{
 
87
class Boolean;
 
88
class True;
 
89
class False;
 
90
}
 
91
 
85
92
 
86
93
static bool check_reserved_words(LEX_STRING *name)
87
94
{
3649
3656
cast_type:
3650
3657
          BINARY opt_len
3651
3658
          { $$=ITEM_CAST_CHAR; Lex->charset= &my_charset_bin; Lex->dec= 0; }
 
3659
        | BOOLEAN_SYM
 
3660
          { $$=ITEM_CAST_BOOLEAN; Lex->charset= &my_charset_bin; Lex->dec= 0; }
3652
3661
        | SIGNED_SYM
3653
3662
          { $$=ITEM_CAST_SIGNED; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; }
3654
3663
        | SIGNED_SYM INT_SYM
5940
5949
            $$ = new Item_null();
5941
5950
            YYSession->m_lip->next_state=MY_LEX_OPERATOR_OR_IDENT;
5942
5951
          }
5943
 
        | FALSE_SYM { $$= new Item_int((char*) "FALSE",0,1); }
5944
 
        | TRUE_SYM { $$= new Item_int((char*) "TRUE",1,1); }
 
5952
        | FALSE_SYM { $$= new drizzled::item::False(); }
 
5953
        | TRUE_SYM { $$= new drizzled::item::True(); }
5945
5954
        | HEX_NUM { $$ = new Item_hex_string($1.str, $1.length);}
5946
5955
        | BIN_NUM { $$= new Item_bin_string($1.str, $1.length); }
5947
5956
        | DATE_SYM text_literal { $$ = $2; }