BUG#14303860 - EXECUTING A SELECT QUERY WITH TOO

MANY WILDCARDS CAUSES A SEGFAULT

Back port from 5.6 and trunk
This commit is contained in:
Neeraj Bisht 2013-01-14 14:59:48 +05:30
commit 78664f54a0
10 changed files with 145 additions and 47 deletions

View file

@ -28,7 +28,7 @@ typedef struct {
/* === regcomp.c === */
typedef int (*my_regex_stack_check_t)();
typedef int (*my_regex_stack_check_t)(int);
extern int my_regcomp(my_regex_t *, const char *, int, CHARSET_INFO *charset);
#define REG_BASIC 0000
#define REG_EXTENDED 0001

View file

@ -227,7 +227,7 @@ int stop; /* character this ERE should end at */
while (MORE() && (c = PEEK()) != '|' && c != stop)
{
if (my_regex_enough_mem_in_stack &&
my_regex_enough_mem_in_stack())
my_regex_enough_mem_in_stack(0))
{
SETERROR(REG_ESPACE);
return;