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-03-22 22:33:19+11:00, stewart@stripped +3 -0
[PATCH] WL#3704 mgmapi timeouts: add ndb_mgm_set_timeout(h,ms)
Add not so neat set_timeout call to make testMgm work
Index: ndb-work/storage/ndb/include/mgmapi/mgmapi.h
===================================================================
storage/ndb/include/mgmapi/mgmapi.h@stripped, 2007-02-14 22:32:37+11:00, stewart@stripped +11 -0
WL#3704 mgmapi timeouts: add ndb_mgm_set_timeout(h,ms)
storage/ndb/src/mgmapi/mgmapi.cpp@stripped, 2007-02-14 22:32:37+11:00, stewart@stripped +10 -0
WL#3704 mgmapi timeouts: add ndb_mgm_set_timeout(h,ms)
storage/ndb/test/ndbapi/testMgm.cpp@stripped, 2007-02-14 22:32:37+11:00, stewart@stripped +2 -0
WL#3704 mgmapi timeouts: add ndb_mgm_set_timeout(h,ms)
# 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-work
--- 1.62/storage/ndb/include/mgmapi/mgmapi.h 2007-02-14 16:37:37 +11:00
+++ 1.63/storage/ndb/include/mgmapi/mgmapi.h 2007-02-14 22:32:37 +11:00
@@ -556,6 +556,17 @@
int ndb_mgm_set_connect_timeout(NdbMgmHandle handle, unsigned int seconds);
/**
+ * Sets the number of milliseconds for timeout for read and write operations
+ * to the socket
+ * Default is 50,000 for read, 1000 for write
+ *
+ * @param handle NdbMgmHandle
+ * @param rw_milliseconds number of milliseconds
+ * @return zero on success
+ */
+ int ndb_mgm_set_timeout(NdbMgmHandle handle, unsigned int rw_milliseconds);
+
+ /**
* Connects to a management server. Connectstring is set by
* ndb_mgm_set_connectstring().
*
--- 1.88/storage/ndb/src/mgmapi/mgmapi.cpp 2007-02-14 22:32:27 +11:00
+++ 1.89/storage/ndb/src/mgmapi/mgmapi.cpp 2007-02-14 22:32:37 +11:00
@@ -444,6 +444,16 @@
return 0;
}
+extern "C"
+int ndb_mgm_set_timeout(NdbMgmHandle handle, unsigned int rw_milliseconds)
+{
+ if(!handle)
+ return -1;
+
+ handle->read_timeout= handle->write_timeout= rw_milliseconds;
+ return 0;
+}
+
/**
* Connect to a management server
*/
--- 1.9/storage/ndb/test/ndbapi/testMgm.cpp 2007-03-02 21:23:53 +11:00
+++ 1.10/storage/ndb/test/ndbapi/testMgm.cpp 2007-02-14 22:32:37 +11:00
@@ -240,6 +240,8 @@
ndbout << "Inserted session error" << endl;
+ ndb_mgm_set_timeout(h,1000,1000);
+
cc= ndb_mgm_check_connection(h);
if(cc < 0)
result= NDBT_OK;
| Thread |
|---|
| • bk commit into 5.1 tree (stewart:1.2497) | Stewart Smith | 22 Mar |