Debian Codegraph @

mysql-test/suite/ndb/t/have_ndb_error_insert.inc

raw
1 #
2 # Check if the binaries are compiled with error insert support
3 # by running ndb_mgm and check if it support the command "all error" which
4 # is only available when error insert is suppoerted.
5 #
6
7 --disable_query_log
8 let $dump_file = $MYSQLTEST_VARDIR/tmp/ndb_mgm_error.txt;
9
10 # Dump the output of ndb_mgm "all error 0" to file
11 --error 0,255
12 --exec $NDB_MGM -e "all error 0" > $dump_file
13
14 # Load the file into a temporary table
15 CREATE TEMPORARY TABLE t37 (a varchar(512)) ENGINE = HEAP;
16
17 --replace_result $dump_file DUMP_FILE
18 eval LOAD DATA INFILE '$dump_file' INTO TABLE t37;
19 --remove_file $dump_file
20
21 # Query the temporary table
22 let $invalid_command_error =
23 `SELECT count(*) FROM t37 WHERE a REGEXP 'Invalid command: error'`;
24
25 DROP TABLE t37;
26
27 if ($invalid_command_error)
28 {
29 skip No error insert support;
30 }
31
32 --enable_query_log