~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

  • Committer: Grant Limberg
  • Date: 2008-08-12 21:13:01 UTC
  • mto: (322.1.1 codestyle)
  • mto: This revision was merged to the branch mainline in revision 324.
  • Revision ID: grant@glsoftware.net-20080812211301-ym3wsowelkgp16s2
renamed all instances of MYSQL_ to DRIZZLE_

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
#define YYENABLE_NLS 0
33
33
#define YYLTYPE_IS_TRIVIAL 0
34
34
 
35
 
#define MYSQL_YACC
 
35
#define DRIZZLE_YACC
36
36
#define YYINITDEPTH 100
37
37
#define YYMAXDEPTH 3200                        /* Because of 64K stack */
38
38
#define Lex (YYTHD->lex)
58
58
    }                                         \
59
59
  }
60
60
 
61
 
#define MYSQL_YYABORT                         \
 
61
#define DRIZZLE_YYABORT                         \
62
62
  do                                          \
63
63
  {                                           \
64
64
    LEX::cleanup_lex_after_parse_error(YYTHD);\
65
65
    YYABORT;                                  \
66
66
  } while (0)
67
67
 
68
 
#define MYSQL_YYABORT_UNLESS(A)         \
 
68
#define DRIZZLE_YYABORT_UNLESS(A)         \
69
69
  if (!(A))                             \
70
70
  {                                     \
71
71
    my_parse_error(ER(ER_SYNTAX_ERROR));\
72
 
    MYSQL_YYABORT;                      \
 
72
    DRIZZLE_YYABORT;                      \
73
73
  }
74
74
 
75
75
/*
127
127
  condition occurs. This function is not invoked when the
128
128
  parser is requested to abort by semantic action code
129
129
  by means of YYABORT or YYACCEPT macros. This is why these
130
 
  macros should not be used (use MYSQL_YYABORT/MYSQL_YYACCEPT
 
130
  macros should not be used (use DRIZZLE_YYABORT/DRIZZLE_YYACCEPT
131
131
  instead).
132
132
 
133
133
  The parser will abort immediately after invoking this callback.
135
135
  This function is not for use in semantic actions and is internal to
136
136
  the parser, as it performs some pre-return cleanup. 
137
137
  In semantic actions, please use my_parse_error or my_error to
138
 
  push an error into the error stack and MYSQL_YYABORT
 
138
  push an error into the error stack and DRIZZLE_YYABORT
139
139
  to abort from the parser.
140
140
*/
141
141
 
1088
1088
              (!(thd->lex->select_lex.options & OPTION_FOUND_COMMENT)))
1089
1089
            {
1090
1090
              my_message(ER_EMPTY_QUERY, ER(ER_EMPTY_QUERY), MYF(0));
1091
 
              MYSQL_YYABORT;
 
1091
              DRIZZLE_YYABORT;
1092
1092
            }
1093
1093
            else
1094
1094
            {
1194
1194
                       MYF(0),
1195
1195
                       " is negative or exceeds the maximum ",
1196
1196
                       buf); 
1197
 
              MYSQL_YYABORT;
 
1197
              DRIZZLE_YYABORT;
1198
1198
            }
1199
1199
            if (Lex->mi.heartbeat_period > slave_net_timeout)
1200
1200
            {
1269
1269
            if (!lex->select_lex.add_table_to_list(thd, $5, NULL,
1270
1270
                                                   TL_OPTION_UPDATING,
1271
1271
                                                   TL_WRITE))
1272
 
              MYSQL_YYABORT;
 
1272
              DRIZZLE_YYABORT;
1273
1273
            lex->alter_info.reset();
1274
1274
            lex->col_list.empty();
1275
1275
            lex->change=NullS;
1302
1302
            if (!lex->current_select->add_table_to_list(lex->thd, $8,
1303
1303
                                                        NULL,
1304
1304
                                                        TL_OPTION_UPDATING))
1305
 
              MYSQL_YYABORT;
 
1305
              DRIZZLE_YYABORT;
1306
1306
            lex->alter_info.reset();
1307
1307
            lex->alter_info.flags= ALTER_ADD_INDEX;
1308
1308
            lex->alter_info.build_method= $2;
1343
1343
 
1344
1344
            lex->create_info.options|= HA_LEX_CREATE_TABLE_LIKE;
1345
1345
            if (!lex->select_lex.add_table_to_list(thd, $2, NULL, 0, TL_READ))
1346
 
              MYSQL_YYABORT;
 
1346
              DRIZZLE_YYABORT;
1347
1347
          }
1348
1348
        | '(' LIKE table_ident ')'
1349
1349
          {
1352
1352
 
1353
1353
            lex->create_info.options|= HA_LEX_CREATE_TABLE_LIKE;
1354
1354
            if (!lex->select_lex.add_table_to_list(thd, $3, NULL, 0, TL_READ))
1355
 
              MYSQL_YYABORT;
 
1355
              DRIZZLE_YYABORT;
1356
1356
          }
1357
1357
        ;
1358
1358
 
1507
1507
                break;
1508
1508
            default:
1509
1509
                my_parse_error(ER(ER_SYNTAX_ERROR));
1510
 
                MYSQL_YYABORT;
 
1510
                DRIZZLE_YYABORT;
1511
1511
            }
1512
1512
            Lex->create_info.used_fields|= HA_CREATE_USED_PACK_KEYS;
1513
1513
          }
1584
1584
              my_error(ER_CONFLICTING_DECLARATIONS, MYF(0),
1585
1585
                       "CHARACTER SET ", cinfo->default_table_charset->csname,
1586
1586
                       "CHARACTER SET ", $4->csname);
1587
 
              MYSQL_YYABORT;
 
1587
              DRIZZLE_YYABORT;
1588
1588
            }
1589
1589
            Lex->create_info.default_table_charset= $4;
1590
1590
            Lex->create_info.used_fields|= HA_CREATE_USED_DEFAULT_CHARSET;
1601
1601
              {
1602
1602
                my_error(ER_COLLATION_CHARSET_MISMATCH, MYF(0),
1603
1603
                         $4->name, cinfo->default_table_charset->csname);
1604
 
                MYSQL_YYABORT;
 
1604
                DRIZZLE_YYABORT;
1605
1605
              }
1606
1606
              Lex->create_info.default_table_charset= $4;
1607
1607
              Lex->create_info.used_fields|= HA_CREATE_USED_DEFAULT_CHARSET;
1618
1618
            else
1619
1619
            {
1620
1620
              my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), $1.str);
1621
 
              MYSQL_YYABORT;
 
1621
              DRIZZLE_YYABORT;
1622
1622
            }
1623
1623
          }
1624
1624
        ;
1632
1632
            else
1633
1633
            {
1634
1634
              my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), $1.str);
1635
 
              MYSQL_YYABORT;
 
1635
              DRIZZLE_YYABORT;
1636
1636
            }
1637
1637
          }
1638
1638
        ;
1759
1759
                                  lex->default_value, lex->on_update_value, 
1760
1760
                                  &lex->comment,
1761
1761
                                  lex->change,&lex->interval_list,lex->charset))
1762
 
              MYSQL_YYABORT;
 
1762
              DRIZZLE_YYABORT;
1763
1763
          }
1764
1764
        ;
1765
1765
 
1978
1978
            {
1979
1979
              my_error(ER_COLLATION_CHARSET_MISMATCH, MYF(0),
1980
1980
                       $2->name,Lex->charset->csname);
1981
 
              MYSQL_YYABORT;
 
1981
              DRIZZLE_YYABORT;
1982
1982
            }
1983
1983
            else
1984
1984
            {
2005
2005
            if (!($$=get_charset_by_csname($1.str,MY_CS_PRIMARY,MYF(0))))
2006
2006
            {
2007
2007
              my_error(ER_UNKNOWN_CHARACTER_SET, MYF(0), $1.str);
2008
 
              MYSQL_YYABORT;
 
2008
              DRIZZLE_YYABORT;
2009
2009
            }
2010
2010
          }
2011
2011
        | BINARY { $$= &my_charset_bin; }
2028
2028
                !($$=get_old_charset_by_name($1.str)))
2029
2029
            {
2030
2030
              my_error(ER_UNKNOWN_CHARACTER_SET, MYF(0), $1.str);
2031
 
              MYSQL_YYABORT;
 
2031
              DRIZZLE_YYABORT;
2032
2032
            }
2033
2033
          }
2034
2034
        | BINARY { $$= &my_charset_bin; }
2045
2045
            if (!($$=get_charset_by_name($1.str,MYF(0))))
2046
2046
            {
2047
2047
              my_error(ER_UNKNOWN_COLLATION, MYF(0), $1.str);
2048
 
              MYSQL_YYABORT;
 
2048
              DRIZZLE_YYABORT;
2049
2049
            }
2050
2050
          }
2051
2051
        ;
2075
2075
                                                     MY_CS_PRIMARY,MYF(0))))
2076
2076
            {
2077
2077
              my_error(ER_UNKNOWN_CHARACTER_SET, MYF(0), "ucs2");
2078
 
              MYSQL_YYABORT;
 
2078
              DRIZZLE_YYABORT;
2079
2079
            }
2080
2080
          }
2081
2081
        | charset charset_name opt_bin_mod { Lex->charset=$2; }
2096
2096
                                                     MY_CS_PRIMARY,MYF(0))))
2097
2097
            {
2098
2098
              my_error(ER_UNKNOWN_CHARACTER_SET, MYF(0), "ucs2");
2099
 
              MYSQL_YYABORT;
 
2099
              DRIZZLE_YYABORT;
2100
2100
            }
2101
2101
          }
2102
2102
        | charset charset_name { Lex->charset=$2; }
2108
2108
          if ($2 == 0)
2109
2109
          {
2110
2110
            my_parse_error(ER(ER_SYNTAX_ERROR));
2111
 
            MYSQL_YYABORT;
 
2111
            DRIZZLE_YYABORT;
2112
2112
          }
2113
2113
        }
2114
2114
        ')'
2379
2379
            lex->duplicates= DUP_ERROR; 
2380
2380
            if (!lex->select_lex.add_table_to_list(thd, $5, NULL,
2381
2381
                                                   TL_OPTION_UPDATING))
2382
 
              MYSQL_YYABORT;
 
2382
              DRIZZLE_YYABORT;
2383
2383
            lex->alter_info.reset();
2384
2384
            lex->col_list.empty();
2385
2385
            lex->select_lex.init_order();
2407
2407
            lex->name= $3;
2408
2408
            if (lex->name.str == NULL &&
2409
2409
                lex->copy_db_to(&lex->name.str, &lex->name.length))
2410
 
              MYSQL_YYABORT;
 
2410
              DRIZZLE_YYABORT;
2411
2411
          }
2412
2412
        ;
2413
2413
 
2489
2489
                                  lex->default_value, lex->on_update_value,
2490
2490
                                  &lex->comment,
2491
2491
                                  $3.str, &lex->interval_list, lex->charset))
2492
 
              MYSQL_YYABORT;
 
2492
              DRIZZLE_YYABORT;
2493
2493
          }
2494
2494
          opt_place
2495
2495
        | DROP opt_column field_ident
2550
2550
            if (lex->select_lex.db == NULL &&
2551
2551
                lex->copy_db_to(&lex->select_lex.db, &dummy))
2552
2552
            {
2553
 
              MYSQL_YYABORT;
 
2553
              DRIZZLE_YYABORT;
2554
2554
            }
2555
2555
            if (check_table_name($3->table.str,$3->table.length) || ($3->db.str && check_db_name(&$3->db)))
2556
2556
            {
2557
2557
              my_error(ER_WRONG_TABLE_NAME, MYF(0), $3->table.str);
2558
 
              MYSQL_YYABORT;
 
2558
              DRIZZLE_YYABORT;
2559
2559
            }
2560
2560
            lex->name= $3->table;
2561
2561
            lex->alter_info.flags|= ALTER_RENAME;
2572
2572
            {
2573
2573
              my_error(ER_COLLATION_CHARSET_MISMATCH, MYF(0),
2574
2574
                       $5->name, $4->csname);
2575
 
              MYSQL_YYABORT;
 
2575
              DRIZZLE_YYABORT;
2576
2576
            }
2577
2577
            LEX *lex= Lex;
2578
2578
            lex->create_info.table_charset=
2682
2682
          /*empty*/ { $$ = 0; }
2683
2683
        | WITH CONSISTENT_SYM SNAPSHOT_SYM
2684
2684
          {
2685
 
            $$= MYSQL_START_TRANS_OPT_WITH_CONS_SNAPSHOT;
 
2685
            $$= DRIZZLE_START_TRANS_OPT_WITH_CONS_SNAPSHOT;
2686
2686
          }
2687
2687
        ;
2688
2688
 
2714
2714
            {
2715
2715
               my_message(ER_BAD_SLAVE_UNTIL_COND,
2716
2716
                          ER(ER_BAD_SLAVE_UNTIL_COND), MYF(0));
2717
 
               MYSQL_YYABORT;
 
2717
               DRIZZLE_YYABORT;
2718
2718
            }
2719
2719
          }
2720
2720
        ;
2860
2860
                                       TL_IGNORE) ||
2861
2861
                !sl->add_table_to_list(lex->thd, $3,NULL,TL_OPTION_UPDATING,
2862
2862
                                       TL_IGNORE))
2863
 
              MYSQL_YYABORT;
 
2863
              DRIZZLE_YYABORT;
2864
2864
          }
2865
2865
        ;
2866
2866
 
2883
2883
          {
2884
2884
            if (!Select->add_table_to_list(YYTHD, $1, NULL, 0, TL_READ, 
2885
2885
                                           Select->pop_index_hints()))
2886
 
              MYSQL_YYABORT;
 
2886
              DRIZZLE_YYABORT;
2887
2887
          }
2888
2888
        ;
2889
2889
 
2931
2931
          SELECT_SYM select_part2
2932
2932
          {
2933
2933
            if (setup_select_in_parentheses(Lex))
2934
 
              MYSQL_YYABORT;
 
2934
              DRIZZLE_YYABORT;
2935
2935
          }
2936
2936
        | '(' select_paren ')'
2937
2937
        ;
2941
2941
          SELECT_SYM select_part2_derived
2942
2942
          {
2943
2943
            if (setup_select_in_parentheses(Lex))
2944
 
              MYSQL_YYABORT;
 
2944
              DRIZZLE_YYABORT;
2945
2945
          }
2946
2946
        | '(' select_paren_derived ')'
2947
2947
        ;
2954
2954
            if (lex->current_select->set_braces(0))
2955
2955
            {
2956
2956
              my_parse_error(ER(ER_SYNTAX_ERROR));
2957
 
              MYSQL_YYABORT;
 
2957
              DRIZZLE_YYABORT;
2958
2958
            }
2959
2959
            if (sel->linkage == UNION_TYPE &&
2960
2960
                sel->master_unit()->first_select()->braces)
2961
2961
            {
2962
2962
              my_parse_error(ER(ER_SYNTAX_ERROR));
2963
 
              MYSQL_YYABORT;
 
2963
              DRIZZLE_YYABORT;
2964
2964
            }
2965
2965
          }
2966
2966
          union_clause
3006
3006
            if (Select->options & SELECT_DISTINCT && Select->options & SELECT_ALL)
3007
3007
            {
3008
3008
              my_error(ER_WRONG_USAGE, MYF(0), "ALL", "DISTINCT");
3009
 
              MYSQL_YYABORT;
 
3009
              DRIZZLE_YYABORT;
3010
3010
            }
3011
3011
          }
3012
3012
        ;
3021
3021
        | HIGH_PRIORITY
3022
3022
          {
3023
3023
            if (check_simple_select())
3024
 
              MYSQL_YYABORT;
 
3024
              DRIZZLE_YYABORT;
3025
3025
            Lex->lock_option= TL_READ_HIGH_PRIORITY;
3026
3026
          }
3027
3027
        | DISTINCT         { Select->options|= SELECT_DISTINCT; }
3030
3030
        | SQL_BUFFER_RESULT
3031
3031
          {
3032
3032
            if (check_simple_select())
3033
 
              MYSQL_YYABORT;
 
3033
              DRIZZLE_YYABORT;
3034
3034
            Select->options|= OPTION_BUFFER_RESULT;
3035
3035
          }
3036
3036
        | SQL_CALC_FOUND_ROWS
3037
3037
          {
3038
3038
            if (check_simple_select())
3039
 
              MYSQL_YYABORT;
 
3039
              DRIZZLE_YYABORT;
3040
3040
            Select->options|= OPTION_FOUND_ROWS;
3041
3041
          }
3042
3042
        | ALL { Select->options|= SELECT_ALL; }
3067
3067
                                 new Item_field(&thd->lex->current_select->
3068
3068
                                                context,
3069
3069
                                                NULL, NULL, "*")))
3070
 
              MYSQL_YYABORT;
 
3070
              DRIZZLE_YYABORT;
3071
3071
            (thd->lex->current_select->with_wild)++;
3072
3072
          }
3073
3073
        ;
3078
3078
            THD *thd= YYTHD;
3079
3079
 
3080
3080
            if (add_item_to_list(thd, $2))
3081
 
              MYSQL_YYABORT;
 
3081
              DRIZZLE_YYABORT;
3082
3082
          }
3083
3083
        | remember_name expr remember_end select_alias
3084
3084
          {
3086
3086
            assert($1 < $3);
3087
3087
 
3088
3088
            if (add_item_to_list(thd, $2))
3089
 
              MYSQL_YYABORT;
 
3089
              DRIZZLE_YYABORT;
3090
3090
            if ($4.str)
3091
3091
            {
3092
3092
              $2->is_autogenerated_name= false;
3403
3403
            $$= create_func_cast(YYTHD, $3, $5, lex->length, lex->dec,
3404
3404
                                 lex->charset);
3405
3405
            if (!$$)
3406
 
              MYSQL_YYABORT;
 
3406
              DRIZZLE_YYABORT;
3407
3407
          }
3408
3408
        | CASE_SYM opt_expr when_list opt_else END
3409
3409
          { $$= new (YYTHD->mem_root) Item_func_case(* $3, $2, $4 ); }
3412
3412
            $$= create_func_cast(YYTHD, $3, $5, Lex->length, Lex->dec,
3413
3413
                                 Lex->charset);
3414
3414
            if (!$$)
3415
 
              MYSQL_YYABORT;
 
3415
              DRIZZLE_YYABORT;
3416
3416
          }
3417
3417
        | CONVERT_SYM '(' expr USING charset_name ')'
3418
3418
          { $$= new (YYTHD->mem_root) Item_func_conv_charset($3,$5); }
3691
3691
              if (lex->current_select->inc_in_sum_expr())
3692
3692
              {
3693
3693
                my_parse_error(ER(ER_SYNTAX_ERROR));
3694
 
                MYSQL_YYABORT;
 
3694
                DRIZZLE_YYABORT;
3695
3695
              }
3696
3696
            }
3697
3697
            /* Temporary placing the result of find_udf in $3 */
3737
3737
 
3738
3738
            if (! ($$= item))
3739
3739
            {
3740
 
              MYSQL_YYABORT;
 
3740
              DRIZZLE_YYABORT;
3741
3741
            }
3742
3742
          }
3743
3743
        ;
3840
3840
            if (! Lex->parsing_options.allows_variable)
3841
3841
            {
3842
3842
              my_error(ER_VIEW_SELECT_VARIABLE, MYF(0));
3843
 
              MYSQL_YYABORT;
 
3843
              DRIZZLE_YYABORT;
3844
3844
            }
3845
3845
          }
3846
3846
          variable_aux
3864
3864
            if ($3.str && $4.str && check_reserved_words(&$3))
3865
3865
            {
3866
3866
              my_parse_error(ER(ER_SYNTAX_ERROR));
3867
 
              MYSQL_YYABORT;
 
3867
              DRIZZLE_YYABORT;
3868
3868
            }
3869
3869
            if (!($$= get_system_var(YYTHD, $2, $3, $4)))
3870
 
              MYSQL_YYABORT;
 
3870
              DRIZZLE_YYABORT;
3871
3871
            if (!((Item_func_get_system_var*) $$)->is_written_to_binlog())
3872
3872
              Lex->set_stmt_unsafe();
3873
3873
          }
3908
3908
            if (lex->current_select->inc_in_sum_expr())
3909
3909
            {
3910
3910
              my_parse_error(ER(ER_SYNTAX_ERROR));
3911
 
              MYSQL_YYABORT;
 
3911
              DRIZZLE_YYABORT;
3912
3912
            }
3913
3913
          }
3914
3914
          expr
3987
3987
          {
3988
3988
            LEX *lex= Lex;
3989
3989
            if (!($$= lex->current_select->nest_last_join(lex->thd)))
3990
 
              MYSQL_YYABORT;
 
3990
              DRIZZLE_YYABORT;
3991
3991
          }
3992
3992
        ;
3993
3993
 
3994
3994
join_table_list:
3995
 
          derived_table_list { MYSQL_YYABORT_UNLESS($$=$1); }
 
3995
          derived_table_list { DRIZZLE_YYABORT_UNLESS($$=$1); }
3996
3996
        ;
3997
3997
 
3998
3998
/*
4013
4013
          esc_table_ref { $$=$1; }
4014
4014
        | derived_table_list ',' esc_table_ref
4015
4015
          {
4016
 
            MYSQL_YYABORT_UNLESS($1 && ($$=$3));
 
4016
            DRIZZLE_YYABORT_UNLESS($1 && ($$=$3));
4017
4017
          }
4018
4018
        ;
4019
4019
 
4032
4032
            left-associative joins.
4033
4033
          */
4034
4034
          table_ref normal_join table_ref %prec TABLE_REF_PRIORITY
4035
 
          { MYSQL_YYABORT_UNLESS($1 && ($$=$3)); }
 
4035
          { DRIZZLE_YYABORT_UNLESS($1 && ($$=$3)); }
4036
4036
        | table_ref STRAIGHT_JOIN table_factor
4037
 
          { MYSQL_YYABORT_UNLESS($1 && ($$=$3)); $3->straight=1; }
 
4037
          { DRIZZLE_YYABORT_UNLESS($1 && ($$=$3)); $3->straight=1; }
4038
4038
        | table_ref normal_join table_ref
4039
4039
          ON
4040
4040
          {
4041
 
            MYSQL_YYABORT_UNLESS($1 && $3);
 
4041
            DRIZZLE_YYABORT_UNLESS($1 && $3);
4042
4042
            /* Change the current name resolution context to a local context. */
4043
4043
            if (push_new_name_resolution_context(YYTHD, $1, $3))
4044
 
              MYSQL_YYABORT;
 
4044
              DRIZZLE_YYABORT;
4045
4045
            Select->parsing_place= IN_ON;
4046
4046
          }
4047
4047
          expr
4053
4053
        | table_ref STRAIGHT_JOIN table_factor
4054
4054
          ON
4055
4055
          {
4056
 
            MYSQL_YYABORT_UNLESS($1 && $3);
 
4056
            DRIZZLE_YYABORT_UNLESS($1 && $3);
4057
4057
            /* Change the current name resolution context to a local context. */
4058
4058
            if (push_new_name_resolution_context(YYTHD, $1, $3))
4059
 
              MYSQL_YYABORT;
 
4059
              DRIZZLE_YYABORT;
4060
4060
            Select->parsing_place= IN_ON;
4061
4061
          }
4062
4062
          expr
4069
4069
        | table_ref normal_join table_ref
4070
4070
          USING
4071
4071
          {
4072
 
            MYSQL_YYABORT_UNLESS($1 && $3);
 
4072
            DRIZZLE_YYABORT_UNLESS($1 && $3);
4073
4073
          }
4074
4074
          '(' using_list ')'
4075
4075
          { add_join_natural($1,$3,$7,Select); $$=$3; }
4076
4076
        | table_ref NATURAL JOIN_SYM table_factor
4077
4077
          {
4078
 
            MYSQL_YYABORT_UNLESS($1 && ($$=$4));
 
4078
            DRIZZLE_YYABORT_UNLESS($1 && ($$=$4));
4079
4079
            add_join_natural($1,$4,NULL,Select);
4080
4080
          }
4081
4081
 
4083
4083
        | table_ref LEFT opt_outer JOIN_SYM table_ref
4084
4084
          ON
4085
4085
          {
4086
 
            MYSQL_YYABORT_UNLESS($1 && $5);
 
4086
            DRIZZLE_YYABORT_UNLESS($1 && $5);
4087
4087
            /* Change the current name resolution context to a local context. */
4088
4088
            if (push_new_name_resolution_context(YYTHD, $1, $5))
4089
 
              MYSQL_YYABORT;
 
4089
              DRIZZLE_YYABORT;
4090
4090
            Select->parsing_place= IN_ON;
4091
4091
          }
4092
4092
          expr
4099
4099
          }
4100
4100
        | table_ref LEFT opt_outer JOIN_SYM table_factor
4101
4101
          {
4102
 
            MYSQL_YYABORT_UNLESS($1 && $5);
 
4102
            DRIZZLE_YYABORT_UNLESS($1 && $5);
4103
4103
          }
4104
4104
          USING '(' using_list ')'
4105
4105
          { 
4109
4109
          }
4110
4110
        | table_ref NATURAL LEFT opt_outer JOIN_SYM table_factor
4111
4111
          {
4112
 
            MYSQL_YYABORT_UNLESS($1 && $6);
 
4112
            DRIZZLE_YYABORT_UNLESS($1 && $6);
4113
4113
            add_join_natural($1,$6,NULL,Select);
4114
4114
            $6->outer_join|=JOIN_TYPE_LEFT;
4115
4115
            $$=$6;
4119
4119
        | table_ref RIGHT opt_outer JOIN_SYM table_ref
4120
4120
          ON
4121
4121
          {
4122
 
            MYSQL_YYABORT_UNLESS($1 && $5);
 
4122
            DRIZZLE_YYABORT_UNLESS($1 && $5);
4123
4123
            /* Change the current name resolution context to a local context. */
4124
4124
            if (push_new_name_resolution_context(YYTHD, $1, $5))
4125
 
              MYSQL_YYABORT;
 
4125
              DRIZZLE_YYABORT;
4126
4126
            Select->parsing_place= IN_ON;
4127
4127
          }
4128
4128
          expr
4129
4129
          {
4130
4130
            LEX *lex= Lex;
4131
4131
            if (!($$= lex->current_select->convert_right_join()))
4132
 
              MYSQL_YYABORT;
 
4132
              DRIZZLE_YYABORT;
4133
4133
            add_join_on($$, $8);
4134
4134
            Lex->pop_context();
4135
4135
            Select->parsing_place= NO_MATTER;
4136
4136
          }
4137
4137
        | table_ref RIGHT opt_outer JOIN_SYM table_factor
4138
4138
          {
4139
 
            MYSQL_YYABORT_UNLESS($1 && $5);
 
4139
            DRIZZLE_YYABORT_UNLESS($1 && $5);
4140
4140
          }
4141
4141
          USING '(' using_list ')'
4142
4142
          {
4143
4143
            LEX *lex= Lex;
4144
4144
            if (!($$= lex->current_select->convert_right_join()))
4145
 
              MYSQL_YYABORT;
 
4145
              DRIZZLE_YYABORT;
4146
4146
            add_join_natural($$,$5,$9,Select);
4147
4147
          }
4148
4148
        | table_ref NATURAL RIGHT opt_outer JOIN_SYM table_factor
4149
4149
          {
4150
 
            MYSQL_YYABORT_UNLESS($1 && $6);
 
4150
            DRIZZLE_YYABORT_UNLESS($1 && $6);
4151
4151
            add_join_natural($6,$1,NULL,Select);
4152
4152
            LEX *lex= Lex;
4153
4153
            if (!($$= lex->current_select->convert_right_join()))
4154
 
              MYSQL_YYABORT;
 
4154
              DRIZZLE_YYABORT;
4155
4155
          }
4156
4156
        ;
4157
4157
 
4180
4180
                                                Select->get_table_join_options(),
4181
4181
                                                Lex->lock_option,
4182
4182
                                                Select->pop_index_hints())))
4183
 
              MYSQL_YYABORT;
 
4183
              DRIZZLE_YYABORT;
4184
4184
            Select->add_joined_table($$);
4185
4185
          }
4186
4186
        | select_derived_init get_select_lex select_derived2
4192
4192
              if (sel->set_braces(1))
4193
4193
              {
4194
4194
                my_parse_error(ER(ER_SYNTAX_ERROR));
4195
 
                MYSQL_YYABORT;
 
4195
                DRIZZLE_YYABORT;
4196
4196
              }
4197
4197
              /* select in braces, can't contain global parameters */
4198
4198
              if (sel->master_unit()->fake_select_lex)
4200
4200
                   sel->master_unit()->fake_select_lex;
4201
4201
            }
4202
4202
            if ($2->init_nested_join(lex->thd))
4203
 
              MYSQL_YYABORT;
 
4203
              DRIZZLE_YYABORT;
4204
4204
            $$= 0;
4205
4205
            /* incomplete derived tables return NULL, we must be
4206
4206
               nested in select_derived rule to be here. */
4249
4249
                                               new Table_ident(unit), $5, 0,
4250
4250
                                               TL_READ)))
4251
4251
 
4252
 
                MYSQL_YYABORT;
 
4252
                DRIZZLE_YYABORT;
4253
4253
              sel->add_joined_table($$);
4254
4254
              lex->pop_context();
4255
4255
            }
4257
4257
            {
4258
4258
              /* simple nested joins cannot have aliases or unions */
4259
4259
              my_parse_error(ER(ER_SYNTAX_ERROR));
4260
 
              MYSQL_YYABORT;
 
4260
              DRIZZLE_YYABORT;
4261
4261
            }
4262
4262
            else
4263
4263
              $$= $3;
4271
4271
          union_option
4272
4272
          {
4273
4273
            if (add_select_to_union_list(Lex, (bool)$3))
4274
 
              MYSQL_YYABORT;
 
4274
              DRIZZLE_YYABORT;
4275
4275
          }
4276
4276
          query_specification
4277
4277
          {
4293
4293
            if (lex->current_select->set_braces(0))
4294
4294
            {
4295
4295
              my_parse_error(ER(ER_SYNTAX_ERROR));
4296
 
              MYSQL_YYABORT;
 
4296
              DRIZZLE_YYABORT;
4297
4297
            }
4298
4298
            if (sel->linkage == UNION_TYPE &&
4299
4299
                sel->master_unit()->first_select()->braces)
4300
4300
            {
4301
4301
              my_parse_error(ER(ER_SYNTAX_ERROR));
4302
 
              MYSQL_YYABORT;
 
4302
              DRIZZLE_YYABORT;
4303
4303
            }
4304
4304
          }
4305
4305
        ;
4326
4326
          {
4327
4327
            LEX *lex= Lex;
4328
4328
            if ($1->init_nested_join(lex->thd))
4329
 
              MYSQL_YYABORT;
 
4329
              DRIZZLE_YYABORT;
4330
4330
          }
4331
4331
          derived_table_list
4332
4332
          {
4335
4335
               for derived tables, both must equal NULL */
4336
4336
 
4337
4337
            if (!($$= $1->end_nested_join(lex->thd)) && $3)
4338
 
              MYSQL_YYABORT;
 
4338
              DRIZZLE_YYABORT;
4339
4339
            if (!$3 && $$)
4340
4340
            {
4341
4341
              my_parse_error(ER(ER_SYNTAX_ERROR));
4342
 
              MYSQL_YYABORT;
 
4342
              DRIZZLE_YYABORT;
4343
4343
            }
4344
4344
          }
4345
4345
        ;
4352
4352
                lex->sql_command == (int)SQLCOM_PURGE)
4353
4353
            {
4354
4354
              my_parse_error(ER(ER_SYNTAX_ERROR));
4355
 
              MYSQL_YYABORT;
 
4355
              DRIZZLE_YYABORT;
4356
4356
            }
4357
4357
            if (lex->current_select->linkage == GLOBAL_OPTIONS_TYPE ||
4358
4358
                mysql_new_select(lex, 1))
4359
 
              MYSQL_YYABORT;
 
4359
              DRIZZLE_YYABORT;
4360
4360
            mysql_init_select(lex);
4361
4361
            lex->current_select->linkage= DERIVED_TABLE_TYPE;
4362
4362
            lex->current_select->parsing_place= SELECT_LIST;
4380
4380
            if (! lex->parsing_options.allows_derived)
4381
4381
            {
4382
4382
              my_error(ER_VIEW_SELECT_DERIVED, MYF(0));
4383
 
              MYSQL_YYABORT;
 
4383
              DRIZZLE_YYABORT;
4384
4384
            }
4385
4385
 
4386
4386
            SELECT_LEX *sel= lex->current_select;
4389
4389
            {
4390
4390
              /* we are not in parentheses */
4391
4391
              my_parse_error(ER(ER_SYNTAX_ERROR));
4392
 
              MYSQL_YYABORT;
 
4392
              DRIZZLE_YYABORT;
4393
4393
            }
4394
4394
            embedding= Select->embedding;
4395
4395
            $$= embedding &&
4468
4468
          ident
4469
4469
          {
4470
4470
            if (!($$= new List<String>))
4471
 
              MYSQL_YYABORT;
 
4471
              DRIZZLE_YYABORT;
4472
4472
            $$->push_back(new (YYTHD->mem_root)
4473
4473
                              String((const char *) $1.str, $1.length,
4474
4474
                                      system_charset_info));
4608
4608
 
4609
4609
group_list:
4610
4610
          group_list ',' order_ident order_dir
4611
 
          { if (add_group_to_list(YYTHD, $3,(bool) $4)) MYSQL_YYABORT; }
 
4611
          { if (add_group_to_list(YYTHD, $3,(bool) $4)) DRIZZLE_YYABORT; }
4612
4612
        | order_ident order_dir
4613
 
          { if (add_group_to_list(YYTHD, $1,(bool) $2)) MYSQL_YYABORT; }
 
4613
          { if (add_group_to_list(YYTHD, $1,(bool) $2)) DRIZZLE_YYABORT; }
4614
4614
        ;
4615
4615
 
4616
4616
olap_opt:
4629
4629
            {
4630
4630
              my_error(ER_WRONG_USAGE, MYF(0), "WITH CUBE",
4631
4631
                       "global union parameters");
4632
 
              MYSQL_YYABORT;
 
4632
              DRIZZLE_YYABORT;
4633
4633
            }
4634
4634
            lex->current_select->olap= CUBE_TYPE;
4635
4635
            my_error(ER_NOT_SUPPORTED_YET, MYF(0), "CUBE");
4636
 
            MYSQL_YYABORT;
 
4636
            DRIZZLE_YYABORT;
4637
4637
          }
4638
4638
        | WITH_ROLLUP_SYM
4639
4639
          {
4649
4649
            {
4650
4650
              my_error(ER_WRONG_USAGE, MYF(0), "WITH ROLLUP",
4651
4651
                       "global union parameters");
4652
 
              MYSQL_YYABORT;
 
4652
              DRIZZLE_YYABORT;
4653
4653
            }
4654
4654
            lex->current_select->olap= ROLLUP_TYPE;
4655
4655
          }
4674
4674
            THD *thd= YYTHD;
4675
4675
            bool ascending= ($2 == 1) ? true : false;
4676
4676
            if (add_order_to_list(thd, $1, ascending))
4677
 
              MYSQL_YYABORT;
 
4677
              DRIZZLE_YYABORT;
4678
4678
          }
4679
4679
        ;
4680
4680
 
4699
4699
            {
4700
4700
              my_error(ER_WRONG_USAGE, MYF(0),
4701
4701
                       "CUBE/ROLLUP", "ORDER BY");
4702
 
              MYSQL_YYABORT;
 
4702
              DRIZZLE_YYABORT;
4703
4703
            }
4704
4704
            if (lex->sql_command != SQLCOM_ALTER_TABLE && !unit->fake_select_lex)
4705
4705
            {
4716
4716
                  (first_sl->order_list.elements || 
4717
4717
                   first_sl->select_limit) &&            
4718
4718
                  unit->add_fake_select_lex(lex->thd))
4719
 
                MYSQL_YYABORT;
 
4719
                DRIZZLE_YYABORT;
4720
4720
            }
4721
4721
          }
4722
4722
          order_list
4724
4724
 
4725
4725
order_list:
4726
4726
          order_list ',' order_ident order_dir
4727
 
          { if (add_order_to_list(YYTHD, $3,(bool) $4)) MYSQL_YYABORT; }
 
4727
          { if (add_order_to_list(YYTHD, $3,(bool) $4)) DRIZZLE_YYABORT; }
4728
4728
        | order_ident order_dir
4729
 
          { if (add_order_to_list(YYTHD, $1,(bool) $2)) MYSQL_YYABORT; }
 
4729
          { if (add_order_to_list(YYTHD, $1,(bool) $2)) DRIZZLE_YYABORT; }
4730
4730
        ;
4731
4731
 
4732
4732
order_dir:
4813
4813
        | HEX_NUM       { $$= (ulong) strtol($1.str, (char**) 0, 16); }
4814
4814
        | LONG_NUM      { int error; $$= (ulong) my_strtoll10($1.str, (char**) 0, &error); }
4815
4815
        | ULONGLONG_NUM { int error; $$= (ulong) my_strtoll10($1.str, (char**) 0, &error); }
4816
 
        | dec_num_error { MYSQL_YYABORT; }
 
4816
        | dec_num_error { DRIZZLE_YYABORT; }
4817
4817
        ;
4818
4818
 
4819
4819
ulonglong_num:
4843
4843
          {
4844
4844
            LEX *lex=Lex;
4845
4845
            if (!lex->describe && (!(lex->result= new select_dumpvar())))
4846
 
              MYSQL_YYABORT;
 
4846
              DRIZZLE_YYABORT;
4847
4847
          }
4848
4848
          select_var_list
4849
4849
          {}
4875
4875
            if (! Lex->parsing_options.allows_select_into)
4876
4876
            {
4877
4877
              my_error(ER_VIEW_SELECT_CLAUSE, MYF(0), "INTO");
4878
 
              MYSQL_YYABORT;
 
4878
              DRIZZLE_YYABORT;
4879
4879
            }
4880
4880
          }
4881
4881
          into_destination
4887
4887
            LEX *lex= Lex;
4888
4888
            if (!(lex->exchange= new sql_exchange($2.str, 0)) ||
4889
4889
                !(lex->result= new select_export(lex->exchange)))
4890
 
              MYSQL_YYABORT;
 
4890
              DRIZZLE_YYABORT;
4891
4891
          }
4892
4892
          opt_field_term opt_line_term
4893
4893
        | DUMPFILE TEXT_STRING_filesystem
4896
4896
            if (!lex->describe)
4897
4897
            {
4898
4898
              if (!(lex->exchange= new sql_exchange($2.str,1)))
4899
 
                MYSQL_YYABORT;
 
4899
                DRIZZLE_YYABORT;
4900
4900
              if (!(lex->result= new select_dump(lex->exchange)))
4901
 
                MYSQL_YYABORT;
 
4901
                DRIZZLE_YYABORT;
4902
4902
            }
4903
4903
          }
4904
4904
        | select_var_list_init
4928
4928
                                                               $4.str));
4929
4929
            if (!lex->current_select->add_table_to_list(lex->thd, $6, NULL,
4930
4930
                                                        TL_OPTION_UPDATING))
4931
 
              MYSQL_YYABORT;
 
4931
              DRIZZLE_YYABORT;
4932
4932
          }
4933
4933
        | DROP DATABASE if_exists ident
4934
4934
          {
4946
4946
          table_ident
4947
4947
          {
4948
4948
            if (!Select->add_table_to_list(YYTHD, $1, NULL, TL_OPTION_UPDATING))
4949
 
              MYSQL_YYABORT;
 
4949
              DRIZZLE_YYABORT;
4950
4950
          }
4951
4951
        ;
4952
4952
 
4961
4961
            if (!Select->add_table_to_list(YYTHD, $1, NULL,
4962
4962
                                           TL_OPTION_UPDATING | TL_OPTION_ALIAS,
4963
4963
                                           Lex->lock_option ))
4964
 
              MYSQL_YYABORT;
 
4964
              DRIZZLE_YYABORT;
4965
4965
          }
4966
4966
        ;
4967
4967
 
5053
5053
            LEX *lex=Lex;
5054
5054
            if (!(lex->insert_list = new List_item) ||
5055
5055
                lex->many_values.push_back(lex->insert_list))
5056
 
              MYSQL_YYABORT;
 
5056
              DRIZZLE_YYABORT;
5057
5057
          }
5058
5058
          ident_eq_list
5059
5059
        ;
5090
5090
            LEX *lex=Lex;
5091
5091
            if (lex->field_list.push_back($1) ||
5092
5092
                lex->insert_list->push_back($3))
5093
 
              MYSQL_YYABORT;
 
5093
              DRIZZLE_YYABORT;
5094
5094
          }
5095
5095
        ;
5096
5096
 
5108
5108
          '('
5109
5109
          {
5110
5110
              if (!(Lex->insert_list = new List_item))
5111
 
                MYSQL_YYABORT;
 
5111
                DRIZZLE_YYABORT;
5112
5112
          }
5113
5113
          opt_values ')'
5114
5114
          {
5115
5115
            LEX *lex=Lex;
5116
5116
            if (lex->many_values.push_back(lex->insert_list))
5117
 
              MYSQL_YYABORT;
 
5117
              DRIZZLE_YYABORT;
5118
5118
          }
5119
5119
        ;
5120
5120
 
5127
5127
          values ','  expr_or_default
5128
5128
          {
5129
5129
            if (Lex->insert_list->push_back($3))
5130
 
              MYSQL_YYABORT;
 
5130
              DRIZZLE_YYABORT;
5131
5131
          }
5132
5132
        | expr_or_default
5133
5133
          {
5134
5134
            if (Lex->insert_list->push_back($1))
5135
 
              MYSQL_YYABORT;
 
5135
              DRIZZLE_YYABORT;
5136
5136
          }
5137
5137
        ;
5138
5138
 
5169
5169
              /* it is single table update and it is update of derived table */
5170
5170
              my_error(ER_NON_UPDATABLE_TABLE, MYF(0),
5171
5171
                       lex->select_lex.get_table_list()->alias, "UPDATE");
5172
 
              MYSQL_YYABORT;
 
5172
              DRIZZLE_YYABORT;
5173
5173
            }
5174
5174
            /*
5175
5175
              In case of multi-update setting write lock for all tables may
5190
5190
          simple_ident_nospvar equal expr_or_default
5191
5191
          {
5192
5192
            if (add_item_to_list(YYTHD, $1) || add_value_to_list(YYTHD, $3))
5193
 
              MYSQL_YYABORT;
 
5193
              DRIZZLE_YYABORT;
5194
5194
          }
5195
5195
        ;
5196
5196
 
5205
5205
          LEX *lex= Lex;
5206
5206
          if (lex->update_list.push_back($1) || 
5207
5207
              lex->value_list.push_back($3))
5208
 
              MYSQL_YYABORT;
 
5208
              DRIZZLE_YYABORT;
5209
5209
          }
5210
5210
        ;
5211
5211
 
5234
5234
          {
5235
5235
            if (!Select->add_table_to_list(YYTHD, $2, NULL, TL_OPTION_UPDATING,
5236
5236
                                           Lex->lock_option))
5237
 
              MYSQL_YYABORT;
 
5237
              DRIZZLE_YYABORT;
5238
5238
          }
5239
5239
          where_clause opt_order_clause
5240
5240
          delete_limit_clause {}
5243
5243
          FROM join_table_list where_clause
5244
5244
          {
5245
5245
            if (multi_delete_set_locks_and_link_aux_tables(Lex))
5246
 
              MYSQL_YYABORT;
 
5246
              DRIZZLE_YYABORT;
5247
5247
          }
5248
5248
        | FROM table_alias_ref_list
5249
5249
          { mysql_init_multi_delete(Lex); }
5250
5250
          USING join_table_list where_clause
5251
5251
          {
5252
5252
            if (multi_delete_set_locks_and_link_aux_tables(Lex))
5253
 
              MYSQL_YYABORT;
 
5253
              DRIZZLE_YYABORT;
5254
5254
          }
5255
5255
        ;
5256
5256
 
5266
5266
                                           NULL,
5267
5267
                                           TL_OPTION_UPDATING | TL_OPTION_ALIAS,
5268
5268
                                           Lex->lock_option))
5269
 
              MYSQL_YYABORT;
 
5269
              DRIZZLE_YYABORT;
5270
5270
          }
5271
5271
        | ident '.' ident opt_wild
5272
5272
          {
5275
5275
                                           NULL,
5276
5276
                                           TL_OPTION_UPDATING | TL_OPTION_ALIAS,
5277
5277
                                           Lex->lock_option))
5278
 
              MYSQL_YYABORT;
 
5278
              DRIZZLE_YYABORT;
5279
5279
          }
5280
5280
        ;
5281
5281
 
5332
5332
             LEX *lex= Lex;
5333
5333
             lex->sql_command= SQLCOM_SHOW_DATABASES;
5334
5334
             if (prepare_schema_table(YYTHD, lex, 0, SCH_SCHEMATA))
5335
 
               MYSQL_YYABORT;
 
5335
               DRIZZLE_YYABORT;
5336
5336
           }
5337
5337
         | opt_full TABLES opt_db wild_and_where
5338
5338
           {
5340
5340
             lex->sql_command= SQLCOM_SHOW_TABLES;
5341
5341
             lex->select_lex.db= $3;
5342
5342
             if (prepare_schema_table(YYTHD, lex, 0, SCH_TABLE_NAMES))
5343
 
               MYSQL_YYABORT;
 
5343
               DRIZZLE_YYABORT;
5344
5344
           }
5345
5345
         | TABLE_SYM STATUS_SYM opt_db wild_and_where
5346
5346
           {
5348
5348
             lex->sql_command= SQLCOM_SHOW_TABLE_STATUS;
5349
5349
             lex->select_lex.db= $3;
5350
5350
             if (prepare_schema_table(YYTHD, lex, 0, SCH_TABLES))
5351
 
               MYSQL_YYABORT;
 
5351
               DRIZZLE_YYABORT;
5352
5352
           }
5353
5353
        | OPEN_SYM TABLES opt_db wild_and_where
5354
5354
          {
5356
5356
            lex->sql_command= SQLCOM_SHOW_OPEN_TABLES;
5357
5357
            lex->select_lex.db= $3;
5358
5358
            if (prepare_schema_table(YYTHD, lex, 0, SCH_OPEN_TABLES))
5359
 
              MYSQL_YYABORT;
 
5359
              DRIZZLE_YYABORT;
5360
5360
          }
5361
5361
        | ENGINE_SYM known_storage_engines STATUS_SYM /* This should either go... well it should go */
5362
5362
          { 
5370
5370
            if ($5)
5371
5371
              $4->change_db($5);
5372
5372
            if (prepare_schema_table(YYTHD, lex, $4, SCH_COLUMNS))
5373
 
              MYSQL_YYABORT;
 
5373
              DRIZZLE_YYABORT;
5374
5374
          }
5375
5375
        | master_or_binary LOGS_SYM
5376
5376
          {
5392
5392
            if ($4)
5393
5393
              $3->change_db($4);
5394
5394
            if (prepare_schema_table(YYTHD, lex, $3, SCH_STATISTICS))
5395
 
              MYSQL_YYABORT;
 
5395
              DRIZZLE_YYABORT;
5396
5396
          }
5397
5397
        | COUNT_SYM '(' '*' ')' WARNINGS
5398
5398
          { (void) create_select_for_variable("warning_count"); }
5408
5408
            lex->sql_command= SQLCOM_SHOW_STATUS;
5409
5409
            lex->option_type= $1;
5410
5410
            if (prepare_schema_table(YYTHD, lex, 0, SCH_STATUS))
5411
 
              MYSQL_YYABORT;
 
5411
              DRIZZLE_YYABORT;
5412
5412
          }
5413
5413
        | opt_full PROCESSLIST_SYM
5414
5414
          { Lex->sql_command= SQLCOM_SHOW_PROCESSLIST;}
5418
5418
            lex->sql_command= SQLCOM_SHOW_VARIABLES;
5419
5419
            lex->option_type= $1;
5420
5420
            if (prepare_schema_table(YYTHD, lex, 0, SCH_VARIABLES))
5421
 
              MYSQL_YYABORT;
 
5421
              DRIZZLE_YYABORT;
5422
5422
          }
5423
5423
        | charset wild_and_where
5424
5424
          {
5425
5425
            LEX *lex= Lex;
5426
5426
            lex->sql_command= SQLCOM_SHOW_CHARSETS;
5427
5427
            if (prepare_schema_table(YYTHD, lex, 0, SCH_CHARSETS))
5428
 
              MYSQL_YYABORT;
 
5428
              DRIZZLE_YYABORT;
5429
5429
          }
5430
5430
        | COLLATION_SYM wild_and_where
5431
5431
          {
5432
5432
            LEX *lex= Lex;
5433
5433
            lex->sql_command= SQLCOM_SHOW_COLLATIONS;
5434
5434
            if (prepare_schema_table(YYTHD, lex, 0, SCH_COLLATIONS))
5435
 
              MYSQL_YYABORT;
 
5435
              DRIZZLE_YYABORT;
5436
5436
          }
5437
5437
        | CREATE DATABASE opt_if_not_exists ident
5438
5438
          {
5445
5445
            LEX *lex= Lex;
5446
5446
            lex->sql_command = SQLCOM_SHOW_CREATE;
5447
5447
            if (!lex->select_lex.add_table_to_list(YYTHD, $3, NULL,0))
5448
 
              MYSQL_YYABORT;
 
5448
              DRIZZLE_YYABORT;
5449
5449
          }
5450
5450
        | MASTER_SYM STATUS_SYM
5451
5451
          {
5513
5513
            lex->select_lex.db= 0;
5514
5514
            lex->verbose= 0;
5515
5515
            if (prepare_schema_table(YYTHD, lex, $2, SCH_COLUMNS))
5516
 
              MYSQL_YYABORT;
 
5516
              DRIZZLE_YYABORT;
5517
5517
          }
5518
5518
          opt_describe_column {}
5519
5519
        | describe_command opt_extended_describe
5692
5692
            lex->duplicates= DUP_ERROR;
5693
5693
            lex->ignore= 0;
5694
5694
            if (!(lex->exchange= new sql_exchange($7.str, 0, $2)))
5695
 
              MYSQL_YYABORT;
 
5695
              DRIZZLE_YYABORT;
5696
5696
          }
5697
5697
          opt_duplicate INTO
5698
5698
          {
5706
5706
            LEX *lex=Lex;
5707
5707
            if (!Select->add_table_to_list(YYTHD, $13, NULL, TL_OPTION_UPDATING,
5708
5708
                                           lex->lock_option))
5709
 
              MYSQL_YYABORT;
 
5709
              DRIZZLE_YYABORT;
5710
5710
            lex->field_list.empty();
5711
5711
            lex->update_list.empty();
5712
5712
            lex->value_list.empty();
5955
5955
            if (!item_str ||
5956
5956
                !item_str->check_well_formed_result(&item_str->str_value, true))
5957
5957
            {
5958
 
              MYSQL_YYABORT;
 
5958
              DRIZZLE_YYABORT;
5959
5959
            }
5960
5960
 
5961
5961
            item_str->set_repertoire_from_value();
5982
5982
            if (!item_str ||
5983
5983
                !item_str->check_well_formed_result(&item_str->str_value, true))
5984
5984
            {
5985
 
              MYSQL_YYABORT;
 
5985
              DRIZZLE_YYABORT;
5986
5986
            }
5987
5987
 
5988
5988
            item_str->set_cs_specified(true);
6012
6012
            $$= new Item_decimal($1.str, $1.length, YYTHD->charset());
6013
6013
            if (YYTHD->is_error())
6014
6014
            {
6015
 
              MYSQL_YYABORT;
 
6015
              DRIZZLE_YYABORT;
6016
6016
            }
6017
6017
          }
6018
6018
        | FLOAT_NUM
6020
6020
            $$ = new Item_float($1.str, $1.length);
6021
6021
            if (YYTHD->is_error())
6022
6022
            {
6023
 
              MYSQL_YYABORT;
 
6023
              DRIZZLE_YYABORT;
6024
6024
            }
6025
6025
          }
6026
6026
        ;
6146
6146
            if (my_strcasecmp(table_alias_charset, $1.str, table->db))
6147
6147
            {
6148
6148
              my_error(ER_WRONG_DB_NAME, MYF(0), $1.str);
6149
 
              MYSQL_YYABORT;
 
6149
              DRIZZLE_YYABORT;
6150
6150
            }
6151
6151
            if (my_strcasecmp(table_alias_charset, $3.str,
6152
6152
                              table->table_name))
6153
6153
            {
6154
6154
              my_error(ER_WRONG_TABLE_NAME, MYF(0), $3.str);
6155
 
              MYSQL_YYABORT;
 
6155
              DRIZZLE_YYABORT;
6156
6156
            }
6157
6157
            $$=$5;
6158
6158
          }
6162
6162
            if (my_strcasecmp(table_alias_charset, $1.str, table->alias))
6163
6163
            {
6164
6164
              my_error(ER_WRONG_TABLE_NAME, MYF(0), $1.str);
6165
 
              MYSQL_YYABORT;
 
6165
              DRIZZLE_YYABORT;
6166
6166
            }
6167
6167
            $$=$3;
6168
6168
          }
6192
6192
              {
6193
6193
                my_error(ER_INVALID_CHARACTER_STRING, MYF(0),
6194
6194
                         cs->csname, $1.str + wlen);
6195
 
                MYSQL_YYABORT;
 
6195
                DRIZZLE_YYABORT;
6196
6196
              }
6197
6197
              $$= $1;
6198
6198
            }
6637
6637
            {
6638
6638
              my_error(ER_COLLATION_CHARSET_MISMATCH, MYF(0),
6639
6639
                       $3->name, $2->csname);
6640
 
              MYSQL_YYABORT;
 
6640
              DRIZZLE_YYABORT;
6641
6641
            }
6642
6642
            lex->var_list.push_back(new set_var_collation_client($3,$3,$3));
6643
6643
          }
6653
6653
              /* Not an SP local variable */
6654
6654
              sys_var *tmp=find_sys_var(thd, $1.str, $1.length);
6655
6655
              if (!tmp)
6656
 
                MYSQL_YYABORT;
 
6656
                DRIZZLE_YYABORT;
6657
6657
              $$.var= tmp;
6658
6658
              $$.base_name= null_lex_str;
6659
6659
            }
6663
6663
            if (check_reserved_words(&$1))
6664
6664
            {
6665
6665
              my_parse_error(ER(ER_SYNTAX_ERROR));
6666
 
              MYSQL_YYABORT;
 
6666
              DRIZZLE_YYABORT;
6667
6667
            }
6668
6668
            {
6669
6669
              sys_var *tmp=find_sys_var(YYTHD, $3.str, $3.length);
6670
6670
              if (!tmp)
6671
 
                MYSQL_YYABORT;
 
6671
                DRIZZLE_YYABORT;
6672
6672
              if (!tmp->is_struct())
6673
6673
                my_error(ER_VARIABLE_IS_NOT_STRUCT, MYF(0), $3.str);
6674
6674
              $$.var= tmp;
6679
6679
          {
6680
6680
            sys_var *tmp=find_sys_var(YYTHD, $3.str, $3.length);
6681
6681
            if (!tmp)
6682
 
              MYSQL_YYABORT;
 
6682
              DRIZZLE_YYABORT;
6683
6683
            if (!tmp->is_struct())
6684
6684
              my_error(ER_VARIABLE_IS_NOT_STRUCT, MYF(0), $3.str);
6685
6685
            $$.var= tmp;
6743
6743
          TABLE_LIST *tlist;
6744
6744
          if (!(tlist= Select->add_table_to_list(YYTHD, $1, $2, 0,
6745
6745
                                                 $3.lock_type)))
6746
 
            MYSQL_YYABORT; /* purecov: inspected */
 
6746
            DRIZZLE_YYABORT; /* purecov: inspected */
6747
6747
          tlist->lock_timeout= $3.lock_timeout;
6748
6748
          /* Store the requested lock method for later warning. */
6749
6749
          tlist->lock_transactional= $3.lock_transactional;
6909
6909
          UNION_SYM union_option
6910
6910
          {
6911
6911
            if (add_select_to_union_list(Lex, (bool)$2))
6912
 
              MYSQL_YYABORT;
 
6912
              DRIZZLE_YYABORT;
6913
6913
          }
6914
6914
          select_init
6915
6915
          {
6979
6979
          UNION_SYM union_option 
6980
6980
          {
6981
6981
            if (add_select_to_union_list(Lex, (bool)$3))
6982
 
              MYSQL_YYABORT;
 
6982
              DRIZZLE_YYABORT;
6983
6983
          }
6984
6984
          query_specification
6985
6985
          {
7003
7003
               lex->sql_command == (int)SQLCOM_PURGE)
7004
7004
            {
7005
7005
              my_parse_error(ER(ER_SYNTAX_ERROR));
7006
 
              MYSQL_YYABORT;
 
7006
              DRIZZLE_YYABORT;
7007
7007
            }
7008
7008
            /* 
7009
7009
              we are making a "derived table" for the parenthesis
7013
7013
              SELECT * FROM ((SELECT ...) UNION ...)
7014
7014
            */
7015
7015
            if (mysql_new_select(Lex, 1))
7016
 
              MYSQL_YYABORT;
 
7016
              DRIZZLE_YYABORT;
7017
7017
          }
7018
7018
        ;
7019
7019