List:Commits« Previous MessageNext Message »
From:Alexey Botchkov Date:September 8 2010 8:55am
Subject:bzr commit into mysql-5.5-bugfixing branch (holyfoot:3205)
View as plain text  
#At file:///home/hf/work/55mrg/ based on revid:holyfoot@stripped

 3205 Alexey Botchkov	2010-09-08 [merge]
      merging.

    modified:
      libmysqld/lib_sql.cc
      sql/derror.cc
      sql/mysqld.cc
      sql/set_var.cc
      sql/set_var.h
      sql/sys_vars.h
=== modified file 'libmysqld/lib_sql.cc'
--- a/libmysqld/lib_sql.cc	2010-07-15 11:33:27 +0000
+++ b/libmysqld/lib_sql.cc	2010-09-02 18:37:04 +0000
@@ -481,6 +481,10 @@ int init_embedded_server(int argc, char 
   char *fake_argv[] = { (char *)"", 0 };
   const char *fake_groups[] = { "server", "embedded", 0 };
   my_bool acl_error;
+
+  if (my_thread_init())
+    return 1;
+
   if (argc)
   {
     argcp= &argc;

=== modified file 'sql/derror.cc'
--- a/sql/derror.cc	2010-07-08 21:20:08 +0000
+++ b/sql/derror.cc	2010-09-02 18:37:04 +0000
@@ -35,6 +35,8 @@ static void init_myfunc_errs(void);
 C_MODE_START
 static const char **get_server_errmsgs()
 {
+  if (!current_thd)
+    return DEFAULT_ERRMSGS;
   return CURRENT_THD_ERRMSGS;
 }
 C_MODE_END

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2010-08-30 14:07:40 +0000
+++ b/sql/mysqld.cc	2010-09-02 18:37:04 +0000
@@ -1486,6 +1486,7 @@ void clean_up(bool print_message)
   cleanup_errmsgs();
   MYSQL_CALLBACK(thread_scheduler, end, ());
   finish_client_errs();
+  (void) my_error_unregister(ER_ERROR_FIRST, ER_ERROR_LAST); // finish server errs
   DBUG_PRINT("quit", ("Error messages freed"));
   /* Tell main we are ready */
   logger.cleanup_end();

=== modified file 'sql/set_var.cc'
--- a/sql/set_var.cc	2010-08-26 00:59:28 +0000
+++ b/sql/set_var.cc	2010-09-02 18:37:04 +0000
@@ -108,7 +108,7 @@ void sys_var_end()
   my_hash_free(&system_variable_hash);
 
   for (sys_var *var=all_sys_vars.first; var; var= var->next)
-    var->~sys_var();
+    var->cleanup();
 
   DBUG_VOID_RETURN;
 }

=== modified file 'sql/set_var.h'
--- a/sql/set_var.h	2010-07-23 20:13:36 +0000
+++ b/sql/set_var.h	2010-09-02 18:37:04 +0000
@@ -92,10 +92,9 @@ public:
           on_check_function on_check_func, on_update_function on_update_func,
           uint deprecated_version, const char *substitute, int parse_flag);
   /**
-    The instance should only be destroyed on shutdown, as it doesn't unlink
-    itself from the chain.
+    All the cleanup procedures should be performed here
   */
-  virtual ~sys_var() {}
+  virtual void cleanup() {}
   /**
     downcast for sys_var_pluginvar. Returns this if it's an instance
     of sys_var_pluginvar, and 0 otherwise.

=== modified file 'sql/sys_vars.h'
--- a/sql/sys_vars.h	2010-08-05 12:34:19 +0000
+++ b/sql/sys_vars.h	2010-09-02 18:37:04 +0000
@@ -385,7 +385,7 @@ public:
     DBUG_ASSERT(scope() == GLOBAL);
     DBUG_ASSERT(size == sizeof(char *));
   }
-  ~Sys_var_charptr()
+  void cleanup()
   {
     if (flags & ALLOCATED)
       my_free(global_var(char*));


Attachment: [text/bzr-bundle] bzr/holyfoot@mysql.com-20100908085449-yrigu38swlbdb3ef.bundle
Thread
bzr commit into mysql-5.5-bugfixing branch (holyfoot:3205)Alexey Botchkov8 Sep