List:Commits« Previous MessageNext Message »
From:kpettersson Date:May 9 2008 2:59pm
Subject:bk commit into 5.1 tree (thek:1.2621) BUG#35997
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of thek.  When thek does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2008-05-09 16:59:32+02:00, thek@adventure.(none) +3 -0
  Bug#35997 Event scheduler seems to let the server crash, if it is embedded.
  
  SHOW commands fail in embedded mode because schema_table array doesn't
  correspond to enum_schema_tables.

  sql/sql_parse.cc@stripped, 2008-05-09 16:59:30+02:00, thek@adventure.(none) +4 -0
    Disable event code in the parser when not compiled with 
    HAVE_EVENT_SCHEDULER

  sql/sql_yacc.yy@stripped, 2008-05-09 16:59:30+02:00, thek@adventure.(none) +4 -0
    Disable event code in the parser when not compiled with 
    HAVE_EVENT_SCHEDULER

  sql/table.h@stripped, 2008-05-09 16:59:30+02:00, thek@adventure.(none) +2 -0
    Disable event code in the parser when not compiled with 
    HAVE_EVENT_SCHEDULER

diff -Nrup a/sql/sql_parse.cc b/sql/sql_parse.cc
--- a/sql/sql_parse.cc	2008-05-09 09:42:59 +02:00
+++ b/sql/sql_parse.cc	2008-05-09 16:59:30 +02:00
@@ -1591,7 +1591,9 @@ int prepare_schema_table(THD *thd, LEX *
   case SCH_TABLES:
   case SCH_VIEWS:
   case SCH_TRIGGERS:
+#ifdef HAVE_EVENT_SCHEDULER
   case SCH_EVENTS:
+#endif
 #ifdef DONT_ALLOW_SHOW_COMMANDS
     my_message(ER_NOT_ALLOWED_COMMAND,
                ER(ER_NOT_ALLOWED_COMMAND), MYF(0)); /* purecov: inspected */
@@ -5008,7 +5010,9 @@ static bool check_show_access(THD *thd, 
   case SCH_TABLES:
   case SCH_VIEWS:
   case SCH_TRIGGERS:
+#ifdef HAVE_EVENT_SCHEDULER
   case SCH_EVENTS:
+#endif
   {
     const char *dst_db_name= table->schema_select_lex->db;
 
diff -Nrup a/sql/sql_yacc.yy b/sql/sql_yacc.yy
--- a/sql/sql_yacc.yy	2008-05-09 09:43:00 +02:00
+++ b/sql/sql_yacc.yy	2008-05-09 16:59:30 +02:00
@@ -9099,8 +9099,12 @@ show_param:
              LEX *lex= Lex;
              lex->sql_command= SQLCOM_SHOW_EVENTS;
              lex->select_lex.db= $2;
+#ifdef HAVE_EVENT_SCHEDULER
              if (prepare_schema_table(YYTHD, lex, 0, SCH_EVENTS))
                MYSQL_YYABORT;
+#else
+             MYSQL_YYABORT;
+#endif
            }
          | TABLE_SYM STATUS_SYM opt_db wild_and_where
            {
diff -Nrup a/sql/table.h b/sql/table.h
--- a/sql/table.h	2008-03-13 22:32:18 +01:00
+++ b/sql/table.h	2008-05-09 16:59:30 +02:00
@@ -721,7 +721,9 @@ enum enum_schema_tables
   SCH_COLUMNS,
   SCH_COLUMN_PRIVILEGES,
   SCH_ENGINES,
+#ifdef HAVE_EVENT_SCHEDULER
   SCH_EVENTS,
+#endif
   SCH_FILES,
   SCH_GLOBAL_STATUS,
   SCH_GLOBAL_VARIABLES,
Thread
bk commit into 5.1 tree (thek:1.2621) BUG#35997kpettersson9 May