summaryrefslogtreecommitdiff
path: root/mysql-test/include
diff options
context:
space:
mode:
authorunknown <magnus@neptunus.(none)>2004-12-15 12:09:19 +0100
committerunknown <magnus@neptunus.(none)>2004-12-15 12:09:19 +0100
commitfcca1791e341ab23d9b571938002a4576972ed32 (patch)
tree847a9dba340aec21369659b680edd000158af5e4 /mysql-test/include
parentead004f91f38d5c90cb73e63969bc1a222c22325 (diff)
downloadmariadb-git-fcca1791e341ab23d9b571938002a4576972ed32.tar.gz
Added test case for multiple MySQL Servers connected to one cluster
Added test for cache in combination with multiple MySQL Servers mysql-test/include/have_ndb.inc: Added suport for connecting to two MySQL Server instances (I hope this will work on all platforms, since it does not use the socket parameter when openeing the connections, analog to how it looks like in replication tests)
Diffstat (limited to 'mysql-test/include')
-rw-r--r--mysql-test/include/have_ndb.inc33
1 files changed, 30 insertions, 3 deletions
diff --git a/mysql-test/include/have_ndb.inc b/mysql-test/include/have_ndb.inc
index 84e60657876..249f3362bce 100644
--- a/mysql-test/include/have_ndb.inc
+++ b/mysql-test/include/have_ndb.inc
@@ -2,6 +2,33 @@
disable_query_log;
show variables like "have_ndbcluster";
enable_query_log;
-#connect (server1,127.0.0.1,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
-#connect (server2,127.0.0.1,root,,test,$MASTER_MYPORT1,$MASTER_MYSOCK1);
-#connection server1;
+
+# Setup connections to both MySQL Servers connected to the cluster
+connect (server1,127.0.0.1,root,,test,$MASTER_MYPORT,);
+connect (server2,127.0.0.1,root,,test,$MASTER_MYPORT1,);
+
+# Check that server1 has NDB support
+connection server1;
+disable_query_log;
+--disable_warnings
+drop table if exists t1, t2;
+--enable_warnings
+flush tables;
+@r/have_ndb.require show variables like "have_ndbcluster";
+@r/server_id.require show variables like "server_id";
+enable_query_log;
+
+# Check that server2 has NDB support
+connection server2;
+disable_query_log;
+--disable_warnings
+drop table if exists t1, t2;
+--enable_warnings
+flush tables;
+@r/have_ndb.require show variables like "have_ndbcluster";
+@r/server_id1.require show variables like "server_id";
+enable_query_log;
+
+# Set the default connection to 'server1'
+connection server1;
+