avoid unintentional %union size increases

This commit is contained in:
Sergei Golubchik 2019-01-10 13:51:28 +01:00
parent 103a32fdd3
commit 9b3f177c6d

View File

@ -788,6 +788,8 @@ Virtual_column_info *add_virtual_expression(THD *thd, Item *expr)
}
%{
/* avoid unintentional %union size increases, it's what a parser stack made of */
static_assert(sizeof(YYSTYPE) == sizeof(void*)*2+8, "%union size check");
bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%}