~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to server/sql_yacc.yy

  • Committer: Brian Aker
  • Date: 2008-07-18 18:55:10 UTC
  • mfrom: (177.1.5 drizzle)
  • Revision ID: brian@tangent.org-20080718185510-o5nnn7g5ub81llqr
Head merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
971
971
        predicate bit_expr
972
972
        table_wild simple_expr udf_expr
973
973
        expr_or_default set_expr_or_default
974
 
        param_marker 
975
974
        signed_literal now_or_signed_literal opt_escape
976
975
        simple_ident_nospvar simple_ident_q
977
976
        field_or_var limit_option
3470
3469
            $$= new (thd->mem_root) Item_func_set_collation($1, i1);
3471
3470
          }
3472
3471
        | literal
3473
 
        | param_marker
3474
3472
        | variable
3475
3473
        | sum_expr
3476
3474
        | '+' simple_expr %prec NEG { $$= $2; }
4898
4896
        ;
4899
4897
 
4900
4898
limit_option:
4901
 
        param_marker
4902
 
        {
4903
 
          ((Item_param *) $1)->limit_clause_param= true;
4904
 
        }
4905
 
        | ULONGLONG_NUM { $$= new Item_uint($1.str, $1.length); }
 
4899
          ULONGLONG_NUM { $$= new Item_uint($1.str, $1.length); }
4906
4900
        | LONG_NUM      { $$= new Item_uint($1.str, $1.length); }
4907
4901
        | NUM           { $$= new Item_uint($1.str, $1.length); }
4908
4902
        ;
6054
6048
          }
6055
6049
        ;
6056
6050
 
6057
 
param_marker:
6058
 
          PARAM_MARKER
6059
 
          {
6060
 
            THD *thd= YYTHD;
6061
 
            LEX *lex= thd->lex;
6062
 
            Lex_input_stream *lip= thd->m_lip;
6063
 
            Item_param *item;
6064
 
            if (! lex->parsing_options.allows_variable)
6065
 
            {
6066
 
              my_error(ER_VIEW_SELECT_VARIABLE, MYF(0));
6067
 
              MYSQL_YYABORT;
6068
 
            }
6069
 
            item= new Item_param((uint) (lip->get_tok_start() - thd->query));
6070
 
            if (!($$= item) || lex->param_list.push_back(item))
6071
 
            {
6072
 
              my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
6073
 
              MYSQL_YYABORT;
6074
 
            }
6075
 
          }
6076
 
        ;
6077
 
 
6078
6051
signed_literal:
6079
6052
          literal { $$ = $1; }
6080
6053
        | '+' NUM_literal { $$ = $2; }