~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

Merge in Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
6464
6464
            { /* System variable */
6465
6465
              if ($1)
6466
6466
                lex->option_type= $1;
6467
 
              lex->var_list.push_back(new set_var(lex->option_type, $2.var,
6468
 
                                      &$2.base_name, $4));
 
6467
              lex->var_list.push_back(SetVarPtr(new set_var(lex->option_type, $2.var,
 
6468
                                      &$2.base_name, $4)));
6469
6469
            }
6470
6470
          }
6471
6471
        | option_type TRANSACTION_SYM ISOLATION LEVEL_SYM isolation_types
6472
6472
          {
6473
6473
            LEX *lex=Lex;
6474
6474
            lex->option_type= $1;
6475
 
            lex->var_list.push_back(new set_var(lex->option_type,
 
6475
            lex->var_list.push_back(SetVarPtr(new set_var(lex->option_type,
6476
6476
                                                find_sys_var("tx_isolation"),
6477
6477
                                                &null_lex_str,
6478
 
                                                new Item_int((int32_t) $5)));
 
6478
                                                new Item_int((int32_t)
 
6479
                                                $5))));
6479
6480
          }
6480
6481
        ;
6481
6482
 
6482
6483
option_value:
6483
6484
          '@' ident_or_text equal expr
6484
6485
          {
6485
 
            Lex->var_list.push_back(new set_var_user(new Item_func_set_user_var($2,$4)));
 
6486
            Lex->var_list.push_back(SetVarPtr(new set_var_user(new
 
6487
                    Item_func_set_user_var($2,$4))));
6486
6488
          }
6487
6489
        | '@' '@' opt_var_ident_type internal_variable_name equal set_expr_or_default
6488
6490
          {
6489
6491
            LEX *lex=Lex;
6490
 
            lex->var_list.push_back(new set_var($3, $4.var, &$4.base_name, $6));
 
6492
            lex->var_list.push_back(SetVarPtr(new set_var($3, $4.var,
 
6493
                    &$4.base_name, $6)));
6491
6494
          }
6492
6495
        ;
6493
6496
 
6497
6500
            /* We have to lookup here since local vars can shadow sysvars */
6498
6501
            {
6499
6502
              /* Not an SP local variable */
6500
 
              sys_var *tmp=find_sys_var($1.str, $1.length);
 
6503
              sys_var *tmp=find_sys_var($1.str);
6501
6504
              if (!tmp)
6502
6505
                DRIZZLE_YYABORT;
6503
6506
              $$.var= tmp;