Debian Codegraph @

mysql-test/suite/ndb/include/ndb_check_file_contains.inc

raw
1 # Input file $check_file
2 # Pattern $check_pattern
3
4 --disable_query_log
5 --disable_result_log
6 create table test.check_file_contains(r varchar(1000)) engine=innodb;
7 eval load data infile '$check_file' into table test.check_file_contains;
8
9 eval select @match_count:=count(1)
10 from test.check_file_contains
11 where r like '%$check_pattern%';
12
13 let $match_count=query_get_value(select @match_count as m, m, 1);
14
15 if ($match_count)
16 {
17 --echo File contains row(s) matching pattern $check_pattern
18 }
19 if (!$match_count)
20 {
21 --echo File $check_file does not contain pattern $check_pattern
22 --echo Content
23 --enable_result_log
24 select * from test.check_file_contains;
25 --disable_result_log
26 --echo /Content
27 }
28
29 drop table test.check_file_contains;
30 --enable_result_log
31 --enable_query_log