From 3c7a8c3748b1dd9e2d986395803172144f07ef62 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 9 Mar 2006 17:37:59 -0800 Subject: [PATCH] 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. --- sql/event_timed.cc | 5 +++-- sql/sql_partition.cc | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sql/event_timed.cc b/sql/event_timed.cc index a8620197668..40987c9132e 100644 --- a/sql/event_timed.cc +++ b/sql/event_timed.cc @@ -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)); diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index 257c1988cbd..014d3616d3d 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -33,6 +33,7 @@ /* Some general useful functions */ +#define MYSQL_LEX 1 #include "mysql_priv.h" #include #include @@ -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;