List:Commits« Previous MessageNext Message »
From:kpettersson Date:May 12 2008 9:41am
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-12 11:41:41+02:00, thek@adventure.(none) +2 -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.
  
  This patch implements a dummy implementation of the abstract fill_table
  function to be used when the event scheduler (or other core feature)
  isn't part of the build.

  libmysqld/lib_sql.cc@stripped, 2008-05-12 11:41:39+02:00, thek@adventure.(none) +1 -1
    Fixed type conversion warning.

  sql/sql_show.cc@stripped, 2008-05-12 11:41:39+02:00, thek@adventure.(none) +13 -0
    Leave entry for EVENTS to keep array consistent but set the 
    fill_table function pointer to a dummy function instead.

diff -Nrup a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
--- a/libmysqld/lib_sql.cc	2008-05-01 03:14:40 +02:00
+++ b/libmysqld/lib_sql.cc	2008-05-12 11:41:39 +02:00
@@ -285,7 +285,7 @@ static int emb_stmt_execute(MYSQL_STMT *
   my_bool res;
 
   int4store(header, stmt->stmt_id);
-  header[4]= stmt->flags;
+  header[4]= (uchar)stmt->flags;
   thd= (THD*)stmt->mysql->thd;
   thd->client_param_count= stmt->param_count;
   thd->client_params= stmt->params;
diff -Nrup a/sql/sql_show.cc b/sql/sql_show.cc
--- a/sql/sql_show.cc	2008-05-09 09:43:00 +02:00
+++ b/sql/sql_show.cc	2008-05-12 11:41:39 +02:00
@@ -3898,6 +3898,16 @@ static my_bool iter_schema_engines(THD *
   DBUG_RETURN(0);
 }
 
+/**
+  A dummy implementation of the fill_schema function.
+
+  @return Always succeeds
+    @retval 0
+*/
+int fill_schema_dummy(THD *thd, TABLE_LIST *tables, COND *cond)
+{
+  return 0;
+}
 
 int fill_schema_engines(THD *thd, TABLE_LIST *tables, COND *cond)
 {
@@ -6548,6 +6558,9 @@ ST_SCHEMA_TABLE schema_tables[]=
 #ifdef HAVE_EVENT_SCHEDULER
   {"EVENTS", events_fields_info, create_schema_table,
    Events::fill_schema_events, make_old_format, 0, -1, -1, 0, 0},
+#else
+  {"EVENTS", events_fields_info, create_schema_table,
+   fill_schema_dummy, make_old_format, 0, -1, -1, 0, 0},
 #endif
   {"FILES", files_fields_info, create_schema_table,
    fill_schema_files, 0, 0, -1, -1, 0, 0},
Thread
bk commit into 5.1 tree (thek:1.2621) BUG#35997kpettersson12 May