File: check_ndb_debug.inc

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (40 lines) | stat: -rw-r--r-- 1,084 bytes parent folder | download
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
39
40
#
#  check_ndb_debug
#
#    Utility for checking whether the Ndb processes appear to have been
#    compiled with debug support
#
#    This utility uses the help text made available in the ndb_mgm binary
#    as an indicator of the presence of debug facilities being available
#    in ndb_mgm, ndb_mgmd, mgmapi, ndb[mtd] et al
#
#  Returns:
#    have_ndb_debug - wheter ndb* binaries are debug compiled or not
#    have_ndb_debug=1 : ndb* binaries are debug compiled
#    have_ndb_debug=0 : ndb* binaries are not debug compiled


disable_query_log;

let $have_ndb_debug = 0;

# Save output of "ndb_mgm --help" in file
let $dump_file = $MYSQLTEST_VARDIR/tmp/help_debug.txt;
--exec $NDB_MGM -e "help" > $dump_file

# Load the output from ndb_mgm into table
create temporary table help_debug(help varchar(256));
--eval load data local infile '$dump_file' into table help_debug;

# Remove the output file
remove_file $dump_file;

if (`SELECT COUNT(*) FROM help_debug WHERE help LIKE '%debug compiled%'`)
{
  let $have_ndb_debug = 1;
}

# Cleanup
drop table help_debug;

enable_query_log;