From: Date: June 13 2007 3:34pm Subject: bk commit into 5.1 tree (stewart:1.2539) BUG#29073 List-Archive: http://lists.mysql.com/commits/28666 X-Bug: 29073 Message-Id: <20070613133415.B93D1A14C8F@localhost.localdomain> Below is the list of changes that have just been committed into a local 5.1 repository of stewart. When stewart 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, 2007-06-13 23:34:09+10:00, stewart@stripped +1 -0 [PATCH] BUG#29073 Store history for ndb_mgm Index: ndb-work/storage/ndb/src/mgmclient/main.cpp =================================================================== storage/ndb/src/mgmclient/main.cpp@stripped, 2007-05-11 20:57:22+10:00, stewart@stripped +21 -0 BUG#29073 Store history for ndb_mgm # 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: stewart # Host: willster.(none) # Root: /home/stewart/Documents/MySQL/5.1/ndb-merge --- 1.30/storage/ndb/src/mgmclient/main.cpp 2007-02-23 22:23:43 +11:00 +++ 1.31/storage/ndb/src/mgmclient/main.cpp 2007-05-11 20:57:22 +10:00 @@ -155,10 +155,31 @@ signal(SIGPIPE, handler); com = new Ndb_mgmclient(opt_connect_str,1); int ret= 0; + BaseString histfile; if (!opt_execute_str) { + char *histfile_env= getenv("NDB_MGM_HISTFILE"); + if (histfile_env) + histfile.assign(histfile_env,strlen(histfile_env)); + else if(getenv("HOME")) + { + histfile.assign(getenv("HOME"),strlen(getenv("HOME"))); + histfile.append("/.ndb_mgm_history"); + } + if (histfile.length()) + read_history(histfile.c_str()); + ndbout << "-- NDB Cluster -- Management Client --" << endl; while(read_and_execute(_try_reconnect)); + + if (histfile.length()) + { + BaseString histfile_tmp; + histfile_tmp.assign(histfile); + histfile_tmp.append(".TMP"); + if(!write_history(histfile_tmp.c_str())) + my_rename(histfile_tmp.c_str(), histfile.c_str(), MYF(MY_WME)); + } } else {