Commit 89bd002c authored by kostja@bodhi.local's avatar kostja@bodhi.local

Rename a macro to better reflect the action taken.

parent 2b1a04e7
...@@ -52,7 +52,7 @@ const LEX_STRING null_lex_str={0,0}; ...@@ -52,7 +52,7 @@ const LEX_STRING null_lex_str={0,0};
ER_WARN_DEPRECATED_SYNTAX, \ ER_WARN_DEPRECATED_SYNTAX, \
ER(ER_WARN_DEPRECATED_SYNTAX), (A), (B)); ER(ER_WARN_DEPRECATED_SYNTAX), (A), (B));
#define YYERROR_UNLESS(A) \ #define YYABORT_UNLESS(A) \
if (!(A)) \ if (!(A)) \
{ \ { \
yyerror(ER(ER_SYNTAX_ERROR)); \ yyerror(ER(ER_SYNTAX_ERROR)); \
...@@ -5485,7 +5485,7 @@ table_ref: ...@@ -5485,7 +5485,7 @@ table_ref:
; ;
join_table_list: join_table_list:
derived_table_list { YYERROR_UNLESS($$=$1); } derived_table_list { YYABORT_UNLESS($$=$1); }
; ;
/* Warning - may return NULL in case of incomplete SELECT */ /* Warning - may return NULL in case of incomplete SELECT */
...@@ -5493,7 +5493,7 @@ derived_table_list: ...@@ -5493,7 +5493,7 @@ derived_table_list:
table_ref { $$=$1; } table_ref { $$=$1; }
| derived_table_list ',' table_ref | derived_table_list ',' table_ref
{ {
YYERROR_UNLESS($1 && ($$=$3)); YYABORT_UNLESS($1 && ($$=$3));
} }
; ;
...@@ -5512,13 +5512,13 @@ join_table: ...@@ -5512,13 +5512,13 @@ join_table:
left-associative joins. left-associative joins.
*/ */
table_ref %prec TABLE_REF_PRIORITY normal_join table_ref table_ref %prec TABLE_REF_PRIORITY normal_join table_ref
{ YYERROR_UNLESS($1 && ($$=$3)); } { YYABORT_UNLESS($1 && ($$=$3)); }
| table_ref STRAIGHT_JOIN table_factor | table_ref STRAIGHT_JOIN table_factor
{ YYERROR_UNLESS($1 && ($$=$3)); $3->straight=1; } { YYABORT_UNLESS($1 && ($$=$3)); $3->straight=1; }
| table_ref normal_join table_ref | table_ref normal_join table_ref
ON ON
{ {
YYERROR_UNLESS($1 && $3); YYABORT_UNLESS($1 && $3);
/* Change the current name resolution context to a local context. */ /* Change the current name resolution context to a local context. */
if (push_new_name_resolution_context(YYTHD, $1, $3)) if (push_new_name_resolution_context(YYTHD, $1, $3))
YYABORT; YYABORT;
...@@ -5533,7 +5533,7 @@ join_table: ...@@ -5533,7 +5533,7 @@ join_table:
| table_ref STRAIGHT_JOIN table_factor | table_ref STRAIGHT_JOIN table_factor
ON ON
{ {
YYERROR_UNLESS($1 && $3); YYABORT_UNLESS($1 && $3);
/* Change the current name resolution context to a local context. */ /* Change the current name resolution context to a local context. */
if (push_new_name_resolution_context(YYTHD, $1, $3)) if (push_new_name_resolution_context(YYTHD, $1, $3))
YYABORT; YYABORT;
...@@ -5549,13 +5549,13 @@ join_table: ...@@ -5549,13 +5549,13 @@ join_table:
| table_ref normal_join table_ref | table_ref normal_join table_ref
USING USING
{ {
YYERROR_UNLESS($1 && $3); YYABORT_UNLESS($1 && $3);
} }
'(' using_list ')' '(' using_list ')'
{ add_join_natural($1,$3,$7,Select); $$=$3; } { add_join_natural($1,$3,$7,Select); $$=$3; }
| table_ref NATURAL JOIN_SYM table_factor | table_ref NATURAL JOIN_SYM table_factor
{ {
YYERROR_UNLESS($1 && ($$=$4)); YYABORT_UNLESS($1 && ($$=$4));
add_join_natural($1,$4,NULL,Select); add_join_natural($1,$4,NULL,Select);
} }
...@@ -5563,7 +5563,7 @@ join_table: ...@@ -5563,7 +5563,7 @@ join_table:
| table_ref LEFT opt_outer JOIN_SYM table_ref | table_ref LEFT opt_outer JOIN_SYM table_ref
ON ON
{ {
YYERROR_UNLESS($1 && $5); YYABORT_UNLESS($1 && $5);
/* Change the current name resolution context to a local context. */ /* Change the current name resolution context to a local context. */
if (push_new_name_resolution_context(YYTHD, $1, $5)) if (push_new_name_resolution_context(YYTHD, $1, $5))
YYABORT; YYABORT;
...@@ -5579,7 +5579,7 @@ join_table: ...@@ -5579,7 +5579,7 @@ join_table:
} }
| table_ref LEFT opt_outer JOIN_SYM table_factor | table_ref LEFT opt_outer JOIN_SYM table_factor
{ {
YYERROR_UNLESS($1 && $5); YYABORT_UNLESS($1 && $5);
} }
USING '(' using_list ')' USING '(' using_list ')'
{ {
...@@ -5589,7 +5589,7 @@ join_table: ...@@ -5589,7 +5589,7 @@ join_table:
} }
| table_ref NATURAL LEFT opt_outer JOIN_SYM table_factor | table_ref NATURAL LEFT opt_outer JOIN_SYM table_factor
{ {
YYERROR_UNLESS($1 && $6); YYABORT_UNLESS($1 && $6);
add_join_natural($1,$6,NULL,Select); add_join_natural($1,$6,NULL,Select);
$6->outer_join|=JOIN_TYPE_LEFT; $6->outer_join|=JOIN_TYPE_LEFT;
$$=$6; $$=$6;
...@@ -5599,7 +5599,7 @@ join_table: ...@@ -5599,7 +5599,7 @@ join_table:
| table_ref RIGHT opt_outer JOIN_SYM table_ref | table_ref RIGHT opt_outer JOIN_SYM table_ref
ON ON
{ {
YYERROR_UNLESS($1 && $5); YYABORT_UNLESS($1 && $5);
/* Change the current name resolution context to a local context. */ /* Change the current name resolution context to a local context. */
if (push_new_name_resolution_context(YYTHD, $1, $5)) if (push_new_name_resolution_context(YYTHD, $1, $5))
YYABORT; YYABORT;
...@@ -5616,7 +5616,7 @@ join_table: ...@@ -5616,7 +5616,7 @@ join_table:
} }
| table_ref RIGHT opt_outer JOIN_SYM table_factor | table_ref RIGHT opt_outer JOIN_SYM table_factor
{ {
YYERROR_UNLESS($1 && $5); YYABORT_UNLESS($1 && $5);
} }
USING '(' using_list ')' USING '(' using_list ')'
{ {
...@@ -5627,7 +5627,7 @@ join_table: ...@@ -5627,7 +5627,7 @@ join_table:
} }
| table_ref NATURAL RIGHT opt_outer JOIN_SYM table_factor | table_ref NATURAL RIGHT opt_outer JOIN_SYM table_factor
{ {
YYERROR_UNLESS($1 && $6); YYABORT_UNLESS($1 && $6);
add_join_natural($6,$1,NULL,Select); add_join_natural($6,$1,NULL,Select);
LEX *lex= Lex; LEX *lex= Lex;
if (!($$= lex->current_select->convert_right_join())) if (!($$= lex->current_select->convert_right_join()))
...@@ -5670,7 +5670,7 @@ table_factor: ...@@ -5670,7 +5670,7 @@ table_factor:
expr '}' expr '}'
{ {
LEX *lex= Lex; LEX *lex= Lex;
YYERROR_UNLESS($3 && $7); YYABORT_UNLESS($3 && $7);
add_join_on($7,$10); add_join_on($7,$10);
Lex->pop_context(); Lex->pop_context();
$7->outer_join|=JOIN_TYPE_LEFT; $7->outer_join|=JOIN_TYPE_LEFT;
...@@ -9722,21 +9722,21 @@ xa: XA_SYM begin_or_start xid opt_join_or_resume ...@@ -9722,21 +9722,21 @@ xa: XA_SYM begin_or_start xid opt_join_or_resume
xid: text_string xid: text_string
{ {
YYERROR_UNLESS($1->length() <= MAXGTRIDSIZE); YYABORT_UNLESS($1->length() <= MAXGTRIDSIZE);
if (!(Lex->xid=(XID *)YYTHD->alloc(sizeof(XID)))) if (!(Lex->xid=(XID *)YYTHD->alloc(sizeof(XID))))
YYABORT; YYABORT;
Lex->xid->set(1L, $1->ptr(), $1->length(), 0, 0); Lex->xid->set(1L, $1->ptr(), $1->length(), 0, 0);
} }
| text_string ',' text_string | text_string ',' text_string
{ {
YYERROR_UNLESS($1->length() <= MAXGTRIDSIZE && $3->length() <= MAXBQUALSIZE); YYABORT_UNLESS($1->length() <= MAXGTRIDSIZE && $3->length() <= MAXBQUALSIZE);
if (!(Lex->xid=(XID *)YYTHD->alloc(sizeof(XID)))) if (!(Lex->xid=(XID *)YYTHD->alloc(sizeof(XID))))
YYABORT; YYABORT;
Lex->xid->set(1L, $1->ptr(), $1->length(), $3->ptr(), $3->length()); Lex->xid->set(1L, $1->ptr(), $1->length(), $3->ptr(), $3->length());
} }
| text_string ',' text_string ',' ulong_num | text_string ',' text_string ',' ulong_num
{ {
YYERROR_UNLESS($1->length() <= MAXGTRIDSIZE && $3->length() <= MAXBQUALSIZE); YYABORT_UNLESS($1->length() <= MAXGTRIDSIZE && $3->length() <= MAXBQUALSIZE);
if (!(Lex->xid=(XID *)YYTHD->alloc(sizeof(XID)))) if (!(Lex->xid=(XID *)YYTHD->alloc(sizeof(XID))))
YYABORT; YYABORT;
Lex->xid->set($5, $1->ptr(), $1->length(), $3->ptr(), $3->length()); Lex->xid->set($5, $1->ptr(), $1->length(), $3->ptr(), $3->length());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment