parameter of my_yyoverflow made independed from YYSIZE_T (BUG#4204)
sql/sql_parse.cc: parameter of my_yyoverflow made independed from YYSIZE_T sql/sql_yacc.yy: parameter of my_yyoverflow made independed from YYSIZE_T
This commit is contained in:
parent
b57fe1e26a
commit
d75022fff7
@ -2330,10 +2330,10 @@ bool check_stack_overrun(THD *thd,char *buf __attribute__((unused)))
|
|||||||
#define MY_YACC_INIT 1000 // Start with big alloc
|
#define MY_YACC_INIT 1000 // Start with big alloc
|
||||||
#define MY_YACC_MAX 32000 // Because of 'short'
|
#define MY_YACC_MAX 32000 // Because of 'short'
|
||||||
|
|
||||||
bool my_yyoverflow(short **yyss, YYSTYPE **yyvs, int *yystacksize)
|
bool my_yyoverflow(short **yyss, YYSTYPE **yyvs, ulong *yystacksize)
|
||||||
{
|
{
|
||||||
LEX *lex=current_lex;
|
LEX *lex=current_lex;
|
||||||
int old_info=0;
|
ulong old_info=0;
|
||||||
if ((uint) *yystacksize >= MY_YACC_MAX)
|
if ((uint) *yystacksize >= MY_YACC_MAX)
|
||||||
return 1;
|
return 1;
|
||||||
if (!lex->yacc_yyvs)
|
if (!lex->yacc_yyvs)
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
extern void yyerror(const char*);
|
extern void yyerror(const char*);
|
||||||
int yylex(void *yylval);
|
int yylex(void *yylval);
|
||||||
|
|
||||||
#define yyoverflow(A,B,C,D,E,F) if (my_yyoverflow((B),(D),(int*) (F))) { yyerror((char*) (A)); return 2; }
|
#define yyoverflow(A,B,C,D,E,F) {ulong val= *(F); if(my_yyoverflow((B), (D), &val)) { yyerror((char*) (A)); return 2; } else { *(F)= (YYSIZE_T)val; }}
|
||||||
|
|
||||||
inline Item *or_or_concat(Item* A, Item* B)
|
inline Item *or_or_concat(Item* A, Item* B)
|
||||||
{
|
{
|
||||||
@ -65,7 +65,7 @@ inline Item *or_or_concat(Item* A, Item* B)
|
|||||||
}
|
}
|
||||||
|
|
||||||
%{
|
%{
|
||||||
bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
|
bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%pure_parser /* We have threads */
|
%pure_parser /* We have threads */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user