#At file:///mnt/raid/alik/MySQL/bzr/bug47474/mysql-pe-bug47474/ based on revid:satya.bn@stripped
3613 Alexander Nozdrin 2009-09-23 [merge]
Merge patch for Bug#47474 from mysql-5.1-bugteam.
modified:
sql/ha_ndbcluster.cc
sql/ha_ndbcluster_binlog.cc
sql/mysqld.cc
sql/repl_failsafe.cc
sql/slave.cc
sql/sql_insert.cc
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc 2009-09-16 05:54:22 +0000
+++ b/sql/ha_ndbcluster.cc 2009-09-23 13:13:37 +0000
@@ -10436,9 +10436,11 @@ ndb_util_thread_fail:
pthread_cond_signal(&COND_ndb_util_ready);
pthread_mutex_unlock(&LOCK_ndb_util_thread);
DBUG_PRINT("exit", ("ndb_util_thread"));
+
+ DBUG_LEAVE; // Must match DBUG_ENTER()
my_thread_end();
pthread_exit(0);
- DBUG_RETURN(NULL);
+ return NULL; // Avoid compiler warnings
}
/*
=== modified file 'sql/ha_ndbcluster_binlog.cc'
--- a/sql/ha_ndbcluster_binlog.cc 2009-08-31 20:25:11 +0000
+++ b/sql/ha_ndbcluster_binlog.cc 2009-09-23 13:13:37 +0000
@@ -4697,9 +4697,11 @@ pthread_handler_t ndb_binlog_thread_func
ndb_binlog_thread_running= -1;
pthread_mutex_unlock(&injector_mutex);
pthread_cond_signal(&injector_cond);
+
+ DBUG_LEAVE; // Must match DBUG_ENTER()
my_thread_end();
pthread_exit(0);
- DBUG_RETURN(NULL);
+ return NULL; // Avoid compiler warnings
}
thd->init_for_queries();
@@ -5539,10 +5541,11 @@ err:
(void) pthread_cond_signal(&injector_cond);
DBUG_PRINT("exit", ("ndb_binlog_thread"));
- my_thread_end();
+ DBUG_LEAVE; // Must match DBUG_ENTER()
+ my_thread_end();
pthread_exit(0);
- DBUG_RETURN(NULL);
+ return NULL; // Avoid compiler warnings
}
bool
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc 2009-09-23 08:41:13 +0000
+++ b/sql/mysqld.cc 2009-09-23 13:13:37 +0000
@@ -1241,13 +1241,13 @@ void kill_mysql(void)
#if defined(__NETWARE__)
extern "C" void kill_server(int sig_ptr)
-#define RETURN_FROM_KILL_SERVER DBUG_VOID_RETURN
+#define RETURN_FROM_KILL_SERVER return
#elif !defined(__WIN__)
static void *kill_server(void *sig_ptr)
-#define RETURN_FROM_KILL_SERVER DBUG_RETURN(0)
+#define RETURN_FROM_KILL_SERVER return 0
#else
static void __cdecl kill_server(int sig_ptr)
-#define RETURN_FROM_KILL_SERVER DBUG_VOID_RETURN
+#define RETURN_FROM_KILL_SERVER return
#endif
{
DBUG_ENTER("kill_server");
@@ -1255,7 +1255,10 @@ static void __cdecl kill_server(int sig_
int sig=(int) (long) sig_ptr; // This is passed a int
// if there is a signal during the kill in progress, ignore the other
if (kill_in_progress) // Safety
+ {
+ DBUG_LEAVE;
RETURN_FROM_KILL_SERVER;
+ }
kill_in_progress=TRUE;
abort_loop=1; // This should be set
if (sig != 0) // 0 is not a valid signal number
@@ -1290,12 +1293,19 @@ static void __cdecl kill_server(int sig_
pthread_join(select_thread, NULL); // wait for main thread
#endif /* __NETWARE__ */
+ DBUG_LEAVE; // Must match DBUG_ENTER()
my_thread_end();
pthread_exit(0);
/* purecov: end */
-#endif /* EMBEDDED_LIBRARY */
+ RETURN_FROM_KILL_SERVER; // Avoid compiler warnings
+
+#else /* EMBEDDED_LIBRARY*/
+
+ DBUG_LEAVE;
RETURN_FROM_KILL_SERVER;
+
+#endif /* EMBEDDED_LIBRARY */
}
@@ -2161,8 +2171,9 @@ bool one_thread_per_connection_end(THD *
my_thread_end();
(void) pthread_cond_broadcast(&COND_thread_count);
+ DBUG_LEAVE; // Must match DBUG_ENTER()
pthread_exit(0);
- DBUG_RETURN(0); // Impossible
+ return 0; // Avoid compiler warnings
}
@@ -2959,7 +2970,9 @@ pthread_handler_t signal_hand(void *arg
DBUG_PRINT("quit",("signal_handler: calling my_thread_end()"));
my_thread_end();
signal_thread_in_use= 0;
+ DBUG_LEAVE; // Must match DBUG_ENTER()
pthread_exit(0); // Safety
+ return 0; // Avoid compiler warnings
}
switch (sig) {
case SIGTERM:
=== modified file 'sql/repl_failsafe.cc'
--- a/sql/repl_failsafe.cc 2009-05-15 13:45:06 +0000
+++ b/sql/repl_failsafe.cc 2009-09-23 13:13:37 +0000
@@ -639,9 +639,11 @@ err:
if (recovery_captain)
mysql_close(recovery_captain);
delete thd;
+
+ DBUG_LEAVE; // Must match DBUG_ENTER()
my_thread_end();
pthread_exit(0);
- DBUG_RETURN(0);
+ return 0; // Avoid compiler warnings
}
#endif
=== modified file 'sql/slave.cc'
--- a/sql/slave.cc 2009-09-21 09:04:22 +0000
+++ b/sql/slave.cc 2009-09-23 13:13:37 +0000
@@ -3058,9 +3058,11 @@ err:
pthread_cond_broadcast(&mi->stop_cond); // tell the world we are done
DBUG_EXECUTE_IF("simulate_slave_delay_at_terminate_bug38694", sleep(5););
pthread_mutex_unlock(&mi->run_lock);
+
+ DBUG_LEAVE; // Must match DBUG_ENTER()
my_thread_end();
pthread_exit(0);
- DBUG_RETURN(0); // Can't return anything here
+ return 0; // Avoid compiler warnings
}
/*
@@ -3422,10 +3424,11 @@ the slave SQL thread with \"SLAVE START\
pthread_cond_broadcast(&rli->stop_cond);
DBUG_EXECUTE_IF("simulate_slave_delay_at_terminate_bug38694", sleep(5););
pthread_mutex_unlock(&rli->run_lock); // tell the world we are done
-
+
+ DBUG_LEAVE; // Must match DBUG_ENTER()
my_thread_end();
pthread_exit(0);
- DBUG_RETURN(0); // Can't return anything here
+ return 0; // Avoid compiler warnings
}
=== modified file 'sql/sql_insert.cc'
--- a/sql/sql_insert.cc 2009-09-16 08:23:16 +0000
+++ b/sql/sql_insert.cc 2009-09-23 13:13:37 +0000
@@ -2569,10 +2569,10 @@ end:
pthread_mutex_unlock(&LOCK_delayed_insert);
pthread_mutex_unlock(&LOCK_delayed_create);
+ DBUG_LEAVE; // Must match DBUG_ENTER()
my_thread_end();
pthread_exit(0);
-
- DBUG_VOID_RETURN;
+ return; // Avoid compiler warnings
}
Attachment: [text/bzr-bundle] bzr/alik@sun.com-20090923131337-w1b8o8mnmklg5282.bundle
| Thread |
|---|
| • bzr commit into mysql-pe branch (alik:3613) Bug#47474 | Alexander Nozdrin | 23 Sep |