mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
fcca1791e3
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)
34 lines
929 B
PHP
34 lines
929 B
PHP
-- require r/have_ndb.require
|
|
disable_query_log;
|
|
show variables like "have_ndbcluster";
|
|
enable_query_log;
|
|
|
|
# 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;
|
|
|