Below is the list of changes that have just been committed into a local
4.1 repository of jonas. When jonas 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.2233 05/05/06 17:26:22 joreland@stripped +6 -0
ndb - autotest
Add shutdown options (so far only SIGKILL), so that there won't be any strace mysqld
threads
ndb/test/src/CpcClient.cpp
1.11 05/05/06 17:26:19 joreland@stripped +3 -0
Add shutdown options
(so far only SIGKILL)
ndb/test/run-test/main.cpp
1.26 05/05/06 17:26:19 joreland@stripped +2 -0
Add shutdown options
(so far only SIGKILL)
ndb/test/include/CpcClient.hpp
1.3 05/05/06 17:26:19 joreland@stripped +1 -0
Add shutdown options
(so far only SIGKILL)
ndb/src/cw/cpcd/Process.cpp
1.16 05/05/06 17:26:19 joreland@stripped +8 -1
Add shutdown options
(so far only SIGKILL)
ndb/src/cw/cpcd/CPCD.hpp
1.3 05/05/06 17:26:19 joreland@stripped +6 -0
Add shutdown options
(so far only SIGKILL)
ndb/src/cw/cpcd/APIService.cpp
1.7 05/05/06 17:26:19 joreland@stripped +1 -0
Add shutdown options
(so far only SIGKILL)
# 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: joreland
# Host: eel.mysql.com
# Root: /home/jonas/src/mysql-4.1
--- 1.6/ndb/src/cw/cpcd/APIService.cpp Thu Oct 21 21:01:55 2004
+++ 1.7/ndb/src/cw/cpcd/APIService.cpp Fri May 6 17:26:19 2005
@@ -122,6 +122,7 @@
CPCD_ARG("stderr", String, Optional, "Redirection of stderr"),
CPCD_ARG("stdin", String, Optional, "Redirection of stderr"),
CPCD_ARG("ulimit", String, Optional, "ulimit"),
+ CPCD_ARG("shutdown", String, Optional, "shutdown options"),
CPCD_CMD("undefine process", &CPCDAPISession::undefineProcess, ""),
CPCD_CMD_ALIAS("undef", "undefine process", 0),
--- 1.2/ndb/src/cw/cpcd/CPCD.hpp Fri Sep 17 08:28:20 2004
+++ 1.3/ndb/src/cw/cpcd/CPCD.hpp Fri May 6 17:26:19 2005
@@ -243,6 +243,12 @@
* @desc Format c:unlimited d:0 ...
*/
BaseString m_ulimit;
+
+ /**
+ * @brief shutdown options
+ */
+ BaseString m_shutdown_options;
+
private:
class CPCD *m_cpcd;
void do_exec();
--- 1.15/ndb/src/cw/cpcd/Process.cpp Sat Oct 23 11:05:21 2004
+++ 1.16/ndb/src/cw/cpcd/Process.cpp Fri May 6 17:26:19 2005
@@ -44,6 +44,8 @@
fprintf(f, "stdout: %s\n", m_stdout.c_str() ? m_stdout.c_str() : "");
fprintf(f, "stderr: %s\n", m_stderr.c_str() ? m_stderr.c_str() : "");
fprintf(f, "ulimit: %s\n", m_ulimit.c_str() ? m_ulimit.c_str() : "");
+ fprintf(f, "shutdown: %s\n", m_shutdown_options.c_str() ?
+ m_shutdown_options.c_str() : "");
}
CPCD::Process::Process(const Properties & props, class CPCD *cpcd) {
@@ -64,6 +66,7 @@
props.get("stdout", m_stdout);
props.get("stderr", m_stderr);
props.get("ulimit", m_ulimit);
+ props.get("shutdown", m_shutdown_options);
m_status = STOPPED;
if(strcasecmp(m_type.c_str(), "temporary") == 0){
@@ -451,7 +454,11 @@
m_status = STOPPING;
errno = 0;
- int ret = kill(-m_pid, SIGTERM);
+ int signo= SIGTERM;
+ if(m_shutdown_options == "SIGKILL")
+ signo= SIGKILL;
+
+ int ret = kill(-m_pid, signo);
switch(ret) {
case 0:
logger.debug("Sent SIGTERM to pid %d", (int)-m_pid);
--- 1.10/ndb/test/src/CpcClient.cpp Wed Jan 12 11:17:00 2005
+++ 1.11/ndb/test/src/CpcClient.cpp Fri May 6 17:26:19 2005
@@ -282,6 +282,7 @@
b &= src.get("stdout", dst.m_stdout);
b &= src.get("stderr", dst.m_stderr);
b &= src.get("ulimit", dst.m_ulimit);
+ b &= src.get("shutdown", dst.m_shutdown_options);
return b;
}
@@ -305,6 +306,7 @@
b &= dst.put("stdout", src.m_stdout.c_str());
b &= dst.put("stderr", src.m_stderr.c_str());
b &= dst.put("ulimit", src.m_ulimit.c_str());
+ b &= dst.put("shutdown", src.m_shutdown_options.c_str());
return b;
}
@@ -372,6 +374,7 @@
CPC_ARG("stdout",String, Mandatory, "Redirect stdout"),
CPC_ARG("stderr",String, Mandatory, "Redirect stderr"),
CPC_ARG("ulimit",String, Mandatory, "ulimit"),
+ CPC_ARG("shutdown",String, Mandatory, "shutdown"),
CPC_END()
};
--- 1.2/ndb/test/include/CpcClient.hpp Mon Nov 8 10:32:09 2004
+++ 1.3/ndb/test/include/CpcClient.hpp Fri May 6 17:26:19 2005
@@ -56,6 +56,7 @@
BaseString m_stdout;
BaseString m_stderr;
BaseString m_ulimit;
+ BaseString m_shutdown_options;
};
private:
--- 1.25/ndb/test/run-test/main.cpp Fri May 6 14:44:40 2005
+++ 1.26/ndb/test/run-test/main.cpp Fri May 6 17:26:19 2005
@@ -448,6 +448,7 @@
proc.m_proc.m_runas = proc.m_host->m_user;
proc.m_proc.m_ulimit = "c:unlimited";
proc.m_proc.m_env.assfmt("MYSQL_BASE_DIR=%s", dir.c_str());
+ proc.m_proc.m_shutdown_options = "";
proc.m_hostname = proc.m_host->m_hostname;
proc.m_ndb_mgm_port = g_default_base_port;
if(split1[0] == "mgm"){
@@ -470,6 +471,7 @@
proc.m_proc.m_path.assign(dir).append("/libexec/mysqld");
proc.m_proc.m_args = "--core-file --ndbcluster";
proc.m_proc.m_cwd.appfmt("%d.mysqld", index);
+ proc.m_proc.m_shutdown_options = "SIGKILL"; // not nice
} else if(split1[0] == "api"){
proc.m_type = atrt_process::NDB_API;
proc.m_proc.m_name.assfmt("%d-%s", index, "ndb_api");
| Thread |
|---|
| • bk commit into 4.1 tree (joreland:1.2233) | jonas.oreland | 6 May |