~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

  • Committer: lbieber
  • Date: 2010-08-24 21:21:43 UTC
  • mfrom: (1729.2.1 staging)
  • Revision ID: lbieber@orisndriz03-20100824212143-92y7d27mzo2ez1af
Add memcached query cache plugin

Show diffs side-by-side

added added

removed removed

Lines of Context:
3004
3004
            {
3005
3005
              DRIZZLE_YYABORT;
3006
3006
            }
 
3007
            Lex->setCacheable(false);
3007
3008
          }
3008
3009
        | DATE_SYM '(' expr ')'
3009
3010
          { $$= new (YYSession->mem_root) Item_date_typecast($3); }
3065
3066
            {
3066
3067
              DRIZZLE_YYABORT;
3067
3068
            }
 
3069
            Lex->setCacheable(false);
3068
3070
          }
3069
3071
        | YEAR_SYM '(' expr ')'
3070
3072
          { $$= new (YYSession->mem_root) Item_func_year($3); }
3092
3094
        | CURDATE optional_braces
3093
3095
          {
3094
3096
            $$= new (YYSession->mem_root) Item_func_curdate_local();
 
3097
            Lex->setCacheable(false);
3095
3098
          }
3096
3099
        | DATE_ADD_INTERVAL '(' expr ',' INTERVAL_SYM expr interval ')' %prec INTERVAL_SYM
3097
3100
          { $$= new (YYSession->mem_root) Item_date_add_interval($3,$6,$7,0); }
3102
3105
        | NOW_SYM optional_braces
3103
3106
          {
3104
3107
            $$= new (YYSession->mem_root) Item_func_now_local();
 
3108
            Lex->setCacheable(false);
3105
3109
          }
3106
3110
        | NOW_SYM '(' expr ')'
3107
3111
          {
3108
3112
            $$= new (YYSession->mem_root) Item_func_now_local($3);
 
3113
            Lex->setCacheable(false);
3109
3114
          }
3110
3115
        | POSITION_SYM '(' bit_expr IN_SYM expr ')'
3111
3116
          { $$ = new (YYSession->mem_root) Item_func_locate($5,$3); }
3163
3168
            }
3164
3169
          }
3165
3170
        | SYSDATE optional_braces
3166
 
          { $$= new (YYSession->mem_root) Item_func_sysdate_local(); }
 
3171
          { 
 
3172
            $$= new (YYSession->mem_root) Item_func_sysdate_local(); 
 
3173
            Lex->setCacheable(false);
 
3174
          }
3167
3175
        | SYSDATE '(' expr ')'
3168
 
          { $$= new (YYSession->mem_root) Item_func_sysdate_local($3); }
 
3176
          { 
 
3177
            $$= new (YYSession->mem_root) Item_func_sysdate_local($3); 
 
3178
            Lex->setCacheable(false);
 
3179
          }
3169
3180
        | TIMESTAMP_ADD '(' interval_time_stamp ',' expr ',' expr ')'
3170
3181
          { $$= new (YYSession->mem_root) Item_date_add_interval($7,$5,$3,0); }
3171
3182
        | TIMESTAMP_DIFF '(' interval_time_stamp ',' expr ',' expr ')'
3173
3184
        | UTC_DATE_SYM optional_braces
3174
3185
          {
3175
3186
            $$= new (YYSession->mem_root) Item_func_curdate_utc();
 
3187
            Lex->setCacheable(false);
3176
3188
          }
3177
3189
        | UTC_TIMESTAMP_SYM optional_braces
3178
3190
          {
3179
3191
            $$= new (YYSession->mem_root) Item_func_now_utc();
 
3192
            Lex->setCacheable(false);
3180
3193
          }
3181
3194
        ;
3182
3195
 
3197
3210
            {
3198
3211
              DRIZZLE_YYABORT;
3199
3212
            }
 
3213
            Lex->setCacheable(false);
3200
3214
          }
3201
3215
        | IF '(' expr ',' expr ',' expr ')'
3202
3216
          { $$= new (YYSession->mem_root) Item_func_if($3,$5,$7); }
3277
3291
            {
3278
3292
              DRIZZLE_YYABORT;
3279
3293
            }
 
3294
            Lex->setCacheable(false);
3280
3295
          }
3281
3296
        ;
3282
3297
 
3385
3400
          ident_or_text SET_VAR expr
3386
3401
          {
3387
3402
            $$= new Item_func_set_user_var($1, $3);
 
3403
            Lex->setCacheable(false);
3388
3404
          }
3389
3405
        | ident_or_text
3390
3406
          {
3391
3407
            $$= new Item_func_get_user_var(*YYSession, $1);
 
3408
            Lex->setCacheable(false);
3392
3409
          }
3393
3410
        | '@' opt_var_ident_type ident_or_text opt_component
3394
3411
          {
4356
4373
          OUTFILE TEXT_STRING_filesystem
4357
4374
          {
4358
4375
            LEX *lex= Lex;
 
4376
            lex->setCacheable(false);
4359
4377
            if (!(lex->exchange= new file_exchange($2.str, 0)) ||
4360
4378
                !(lex->result= new select_export(lex->exchange)))
4361
4379
              DRIZZLE_YYABORT;
4366
4384
            LEX *lex=Lex;
4367
4385
            if (!lex->describe)
4368
4386
            {
 
4387
              lex->setCacheable(false);
4369
4388
              if (!(lex->exchange= new file_exchange($2.str,1)))
4370
4389
                DRIZZLE_YYABORT;
4371
4390
              if (!(lex->result= new select_dump(lex->exchange)))
4373
4392
            }
4374
4393
          }
4375
4394
        | select_var_list_init
4376
 
          { }
 
4395
          {Lex->setCacheable(false);}
4377
4396
        ;
4378
4397
 
4379
4398
/*