MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
have_ndb.inc
1 #
2 # Check if cluster is available by selecting from is.engines
3 # if an error about no such table occurs bail out
4 #
5 
6 disable_result_log;
7 disable_query_log;
8 
9 --error 0, 1109
10 select @have_ndb:= count(*) from information_schema.engines where engine='ndbcluster' and support in ('YES', 'DEFAULT', 'ENABLED');
11 
12 
13 if ($mysql_errno){
14  # For backward compatibility, implement old fashioned way
15  # to check here ie. use SHOW VARIABLES LIKE "have_ndb"
16  die Can not determine if server supports ndb without is.engines table;
17 }
18 
19 
20 if (!`select @have_ndb`){
21  skip Need ndb engine;
22 }
23 
24 enable_query_log;
25 enable_result_log;
26 
27 --let NDB_BACKUPS=$NDB_BACKUP_DIR/BACKUP/BACKUP
28