summaryrefslogtreecommitdiff
path: root/ndb/test
diff options
context:
space:
mode:
authorunknown <stewart@willster.(none)>2006-10-05 23:48:38 +1000
committerunknown <stewart@willster.(none)>2006-10-05 23:48:38 +1000
commit66fbc60dc3ba07814fe17186a0e1e01d709ad520 (patch)
tree6b36bd77ae82cc595c3def6163e85429967d6a7f /ndb/test
parentd8730c3a97f82bcff170e8d5a61a120adc297b2f (diff)
parentdb16cae578dd32ee2e66d8746444613c34b1e3e8 (diff)
downloadmariadb-git-66fbc60dc3ba07814fe17186a0e1e01d709ad520.tar.gz
Merge willster.(none):/home/stewart/Documents/MySQL/5.0/ndb
into willster.(none):/home/stewart/Documents/MySQL/5.0/bug13987-5.0_bugfixonly ndb/include/mgmapi/mgmapi.h: Auto merged ndb/src/mgmapi/mgmapi.cpp: Auto merged
Diffstat (limited to 'ndb/test')
-rw-r--r--ndb/test/ndbapi/testMgm.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/ndb/test/ndbapi/testMgm.cpp b/ndb/test/ndbapi/testMgm.cpp
index ef653d3f972..3234117405c 100644
--- a/ndb/test/ndbapi/testMgm.cpp
+++ b/ndb/test/ndbapi/testMgm.cpp
@@ -21,6 +21,8 @@
#include <NdbRestarter.hpp>
#include <Vector.hpp>
#include <random.h>
+#include <mgmapi.h>
+#include <mgmapi_debug.h>
int runLoadTable(NDBT_Context* ctx, NDBT_Step* step){
@@ -167,6 +169,26 @@ int runTestSingleUserMode(NDBT_Context* ctx, NDBT_Step* step){
return result;
}
+int runTestApiSession(NDBT_Context* ctx, NDBT_Step* step)
+{
+ char *mgm= ctx->getRemoteMgm();
+
+ NdbMgmHandle h;
+ h= ndb_mgm_create_handle();
+ ndb_mgm_set_connectstring(h, mgm);
+ ndb_mgm_connect(h,0,0,0);
+ int s= ndb_mgm_get_fd(h);
+ write(s,"get",3);
+ ndb_mgm_disconnect(h);
+ ndb_mgm_destroy_handle(&h);
+ /** NOTE: WE CANNOT REALLY TEST ANYTHING in 5.0
+ *
+ * a more conservative patch for 5.0, full get and list
+ * sessions in 5.1.
+ *
+ * This is kept so that we can at least manually test easily
+ */
+}
NDBT_TESTSUITE(testMgm);
@@ -175,6 +197,11 @@ TESTCASE("SingleUserMode",
INITIALIZER(runTestSingleUserMode);
FINALIZER(runClearTable);
}
+TESTCASE("ApiSessionFailure",
+ "Test failures in MGMAPI session"){
+ INITIALIZER(runTestApiSession);
+
+}
NDBT_TESTSUITE_END(testMgm);
int main(int argc, const char** argv){