List:Commits« Previous MessageNext Message »
From:Petr Chardin Date:February 6 2006 3:35pm
Subject:bk commit into 5.1 tree (petr:1.2131)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of cps. When cps 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
  1.2131 06/02/06 17:35:10 petr@stripped +5 -0
  Merge mysqldev@stripped:my/mysql-5.1-release
  into  mysql.com:/home/cps/mysql/trees/5.1/5.1-virgin-no-debug

  sql/mysqld.cc
    1.527 06/02/06 17:35:05 petr@stripped +0 -0
    Auto merged

  sql/mysql_priv.h
    1.376 06/02/06 17:35:05 petr@stripped +0 -0
    Auto merged

  sql/log.h
    1.4 06/02/06 17:35:05 petr@stripped +0 -0
    Auto merged

  sql/log.cc
    1.190 06/02/06 17:35:05 petr@stripped +0 -0
    Auto merged

  mysql-test/mysql-test-run.pl
    1.59 06/02/06 17:35:05 petr@stripped +0 -0
    Auto merged

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	petr
# Host:	outpost.site
# Root:	/home/cps/mysql/trees/5.1/5.1-virgin-no-debug/RESYNC

--- 1.189/sql/log.cc	2006-01-27 13:41:11 +03:00
+++ 1.190/sql/log.cc	2006-02-06 17:35:05 +03:00
@@ -101,6 +101,7 @@
   NULL,                         /* Partition flags */
   NULL,                         /* Alter table flags */
   NULL,                         /* Alter Tablespace */
+  NULL,                         /* Fill FILES table */
   HTON_NOT_USER_SELECTABLE | HTON_HIDDEN
 };
 
@@ -561,14 +562,25 @@
 }
 
 
-void LOGGER::cleanup()
+void LOGGER::cleanup_base()
 {
   DBUG_ASSERT(inited == 1);
   (void) pthread_mutex_destroy(&LOCK_logger);
   if (table_log_handler)
+  {
     table_log_handler->cleanup();
+    delete table_log_handler;
+  }
   if (file_log_handler)
     file_log_handler->cleanup();
+}
+
+
+void LOGGER::cleanup_end()
+{
+  DBUG_ASSERT(inited == 1);
+  if (file_log_handler)
+    delete file_log_handler;
 }
 
 

--- 1.375/sql/mysql_priv.h	2006-01-28 06:16:19 +03:00
+++ 1.376/sql/mysql_priv.h	2006-02-06 17:35:05 +03:00
@@ -1305,7 +1305,6 @@
 extern bool opt_using_transactions, mysqld_embedded;
 extern bool using_update_log, opt_large_files, server_id_supplied;
 extern bool opt_log, opt_update_log, opt_bin_log, opt_slow_log, opt_error_log;
-extern bool opt_old_log_format;
 extern bool opt_disable_networking, opt_skip_show_db;
 extern my_bool opt_character_set_client_handshake;
 extern bool volatile abort_loop, shutdown_in_progress, grant_option;

--- 1.526/sql/mysqld.cc	2006-02-06 14:31:40 +03:00
+++ 1.527/sql/mysqld.cc	2006-02-06 17:35:05 +03:00
@@ -1149,7 +1149,8 @@
   if (cleanup_done++)
     return; /* purecov: inspected */
 
-  logger.cleanup();
+  logger.cleanup_base();
+
   /*
     make sure that handlers finish up
     what they have that is dependent on the binlog
@@ -1242,6 +1243,8 @@
   /* do the broadcast inside the lock to ensure that my_end() is not called */
   (void) pthread_cond_broadcast(&COND_thread_count);
   (void) pthread_mutex_unlock(&LOCK_thread_count);
+  logger.cleanup_end();
+
   /*
     The following lines may never be executed as the main thread may have
     killed us
@@ -3088,7 +3091,10 @@
   }
 
 #ifdef WITH_CSV_STORAGE_ENGINE
-  logger.init_log_tables();
+  if (opt_bootstrap)
+    opt_old_log_format= TRUE;
+  else
+    logger.init_log_tables();
 
   if (log_output_options & LOG_NONE)
   {
@@ -6728,6 +6734,7 @@
   {"Com_show_engine_logs",     (char*) offsetof(STATUS_VAR, com_stat[(uint)
SQLCOM_SHOW_ENGINE_LOGS]), SHOW_LONG_STATUS},
   {"Com_show_engine_mutex",    (char*) offsetof(STATUS_VAR, com_stat[(uint)
SQLCOM_SHOW_ENGINE_MUTEX]), SHOW_LONG_STATUS},
   {"Com_show_engine_status",   (char*) offsetof(STATUS_VAR, com_stat[(uint)
SQLCOM_SHOW_ENGINE_STATUS]), SHOW_LONG_STATUS},
+  {"Com_show_events",          (char*) offsetof(STATUS_VAR, com_stat[(uint)
SQLCOM_SHOW_EVENTS]), SHOW_LONG_STATUS},
   {"Com_show_errors",	       (char*) offsetof(STATUS_VAR, com_stat[(uint)
SQLCOM_SHOW_ERRORS]), SHOW_LONG_STATUS},
   {"Com_show_fields",	       (char*) offsetof(STATUS_VAR, com_stat[(uint)
SQLCOM_SHOW_FIELDS]), SHOW_LONG_STATUS},
   {"Com_show_grants",	       (char*) offsetof(STATUS_VAR, com_stat[(uint)
SQLCOM_SHOW_GRANTS]), SHOW_LONG_STATUS},

--- 1.58/mysql-test/mysql-test-run.pl	2006-01-27 13:41:11 +03:00
+++ 1.59/mysql-test/mysql-test-run.pl	2006-02-06 17:35:05 +03:00
@@ -1374,7 +1374,8 @@
 		 "--verbose=2",
 		 $ndbcluster_opts,
 		 "--initial",
-                 "--relative-config-data-dir"],
+                 "--relative-config-data-dir",
+	         "--core"],
 		"", "", "", "") )
   {
     mtr_error("Error ndbcluster_install");
@@ -1410,7 +1411,8 @@
   if ( mtr_run("$glob_mysql_test_dir/ndb/ndbcluster",
 	       ["--port=$opt_ndbcluster_port",
 		"--data-dir=$opt_vardir",
-		"--verbose=2"],
+		"--verbose=2",
+	        "--core"],
 	       "", "/dev/null", "", "") )
   {
     mtr_error("Error ndbcluster_start");
@@ -1467,7 +1469,8 @@
 		 "--small",
 		 "--ndbd-nodes=1",
 		 "--initial",
-		 "--relative-config-data-dir"],
+		 "--relative-config-data-dir",
+		 "--core"],
 		"", "", "", "") )
   {
     mtr_error("Error ndbcluster_install_slave");
@@ -1501,7 +1504,8 @@
 	       ["--port=$opt_ndbcluster_port_slave",
 		"--data-dir=$opt_vardir",
 		"--verbose=2",
-		"--ndbd-nodes=1"],
+		"--ndbd-nodes=1",
+	        "--core"],
 	       "", "/dev/null", "", "") )
   {
     mtr_error("Error ndbcluster_start_slave");

--- 1.3/sql/log.h	2006-01-27 13:41:11 +03:00
+++ 1.4/sql/log.h	2006-02-06 17:35:05 +03:00
@@ -469,13 +469,22 @@
   bool flush_logs(THD *thd);
   THD *get_general_log_thd()
   {
-    return (THD *) table_log_handler->general_log_thd;
+    if (table_log_handler)
+      return (THD *) table_log_handler->general_log_thd;
+    else
+      return NULL;
   }
   THD *get_slow_log_thd()
   {
-    return (THD *) table_log_handler->slow_log_thd;
+    if (table_log_handler)
+      return (THD *) table_log_handler->slow_log_thd;
+    else
+      return NULL;
   }
-  void cleanup();
+  /* Perform basic logger cleanup. this will leave e.g. error log open. */
+  void cleanup_base();
+  /* Free memory. Nothing could be logged after this function is called */
+  void cleanup_end();
   bool error_log_print(enum loglevel level, const char *format,
                       va_list args);
   bool slow_log_print(THD *thd, const char *query, uint query_length,
Thread
bk commit into 5.1 tree (petr:1.2131)Petr Chardin6 Feb