Debian Codegraph @

mysql-test/suite/plugins/t/feedback_plugin_send.test

raw
1 # Restart of server does not work for embedded.
2 --source include/not_embedded.inc
3
4 source feedback_plugin_load.test;
5
6 if (!$MTR_FEEDBACK_PLUGIN) {
7 skip MTR_FEEDBACK_PLUGIN is not set;
8 }
9
10 #
11 # Yep. The plugin waits 5 minutes before sending anything,
12 # and there's no way to force it to send anything sooner.
13 # Let's wait, and hope that mtr is started with --parallel and
14 # is doing some work in other workers.
15 #
16
17 sleep 100;
18 set global sql_mode=ONLY_FULL_GROUP_BY;
19 sleep 210;
20
21
22 # The test expects that the plugin will send a report at least 2 times,
23 # now (5 min after loading) and on server shutdown which happens below.
24 # Since we have already waited for 5 min, let's be generous
25 # and make sure the server has enough time to shut down properly.
26 # We won't lose anything if the shutdown is fast, but if it's slow, the plugin
27 # will still be able to finish the job and write about it in the error log.
28
29 --let $shutdown_timeout= 60
30 source include/restart_mysqld.inc;
31
32 replace_result https http 2 6;
33 perl;
34 $log_error= $ENV{'MYSQLTEST_VARDIR'} . '/log/mysqld.1.err';
35 open(LOG, '<', $log_error) or die "open(< $log_error): $!";
36
37 %logg=();
38 while ($_=<LOG>) {
39 $logg{$&}++ if /feedback plugin:.*/;
40 }
41 print "$_\n" for sort keys %logg;
42 close LOG;
43 EOF