summaryrefslogtreecommitdiff
path: root/mysql-test/include/have_multi_ndb.inc
blob: fa201793eafe011483b754dbccbf7ac1b940f874 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# 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;
let $engines_table= query_get_value(SHOW TABLES FROM information_schema LIKE 'engines', Tables_in_information_schema (engines), 1);
disable_query_log;
--disable_warnings
drop table if exists t1, t2;
--enable_warnings
flush tables;
if (`SELECT 1 FROM dual WHERE '$engines_table' = 'engines'`)
{
--require r/true.require
SELECT (support = 'YES' or support = 'DEFAULT' or support = 'ENABLED') as `TRUE` FROM information_schema.engines WHERE engine = 'ndbcluster';
--source include/ndb_not_readonly.inc
}
enable_query_log;

# Check that server2 has NDB support
connection server2;
let $engines_table= query_get_value(SHOW TABLES FROM information_schema LIKE 'engines', Tables_in_information_schema (engines), 1);
disable_query_log;
--disable_warnings
drop table if exists t1, t2;
--enable_warnings
flush tables;
if (`SELECT 1 FROM dual WHERE '$engines_table' = 'engines'`)
{
--require r/true.require
SELECT (support = 'YES' or support = 'DEFAULT' or support = 'ENABLED') as `TRUE` FROM information_schema.engines WHERE engine = 'ndbcluster';
--source include/ndb_not_readonly.inc
}
enable_query_log;

# Set the default connection to 'server1'
connection server1;