Commit 3c7a8c37 authored by unknown's avatar unknown

Fixed portability issue in 5.1 to include parsers from other applications.


sql/event_timed.cc:
  Added support for new parser function
sql/sql_partition.cc:
  Change calling parser name.
parent 8c3b4b14
......@@ -14,13 +14,14 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#define MYSQL_LEX 1
#include "event_priv.h"
#include "event.h"
#include "sp.h"
extern int yyparse(void *thd);
extern int MYSQLparse(void *thd);
/*
Init all member variables
......@@ -1338,7 +1339,7 @@ Event_timed::compile(THD *thd, MEM_ROOT *mem_root)
thd->lex= &lex;
lex_start(thd, (uchar*)thd->query, thd->query_length);
lex.et_compile_phase= TRUE;
if (yyparse((void *)thd) || thd->is_fatal_error)
if (MYSQLparse((void *)thd) || thd->is_fatal_error)
{
DBUG_PRINT("error", ("error during compile or thd->is_fatal_error=%d",
thd->is_fatal_error));
......
......@@ -33,6 +33,7 @@
/* Some general useful functions */
#define MYSQL_LEX 1
#include "mysql_priv.h"
#include <errno.h>
#include <m_ctype.h>
......@@ -3697,7 +3698,7 @@ bool mysql_unpack_partition(THD *thd, const uchar *part_buf,
we then save in the partition info structure.
*/
thd->free_list= NULL;
lex.part_info= new partition_info();/* Indicates yyparse from this place */
lex.part_info= new partition_info();/* Indicates MYSQLparse from this place */
if (!lex.part_info)
{
mem_alloc_error(sizeof(partition_info));
......@@ -3706,7 +3707,7 @@ bool mysql_unpack_partition(THD *thd, const uchar *part_buf,
lex.part_info->part_state= part_state;
lex.part_info->part_state_len= part_state_len;
DBUG_PRINT("info", ("Parse: %s", part_buf));
if (yyparse((void*)thd) || thd->is_fatal_error)
if (MYSQLparse((void*)thd) || thd->is_fatal_error)
{
free_items(thd->free_list);
goto end;
......
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