1 /* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
2 
3    This program is free software; you can redistribute it and/or modify
4    it under the terms of the GNU General Public License, version 2.0,
5    as published by the Free Software Foundation.
6 
7    This program is also distributed with certain software (including
8    but not limited to OpenSSL) that is licensed under separate terms,
9    as designated in a particular file or component or in included license
10    documentation.  The authors of MySQL hereby grant you an additional
11    permission to link the program and your derivative works with the
12    separately licensed software that they have included with MySQL.
13 
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License, version 2.0, for more details.
18 
19    You should have received a copy of the GNU General Public License
20    along with this program; if not, write to the Free Software Foundation,
21    51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
22 
23 #include "applier_channel_state_observer.h"
24 #include "plugin.h"
25 
26 Applier_channel_state_observer::
Applier_channel_state_observer()27 Applier_channel_state_observer()
28 {}
29 
30 int Applier_channel_state_observer::
thread_start(Binlog_relay_IO_param * param)31 thread_start(Binlog_relay_IO_param *param)
32 {
33   return 0;
34 }
35 
thread_stop(Binlog_relay_IO_param * param)36 int Applier_channel_state_observer::thread_stop(Binlog_relay_IO_param *param)
37 {
38   return 0;
39 }
40 
41 int Applier_channel_state_observer::
applier_start(Binlog_relay_IO_param * param)42 applier_start(Binlog_relay_IO_param *param)
43 {
44   return 0;
45 }
46 
47 int Applier_channel_state_observer::
applier_stop(Binlog_relay_IO_param * param,bool aborted)48 applier_stop(Binlog_relay_IO_param *param, bool aborted)
49 {
50   applier_module->inform_of_applier_stop(param->channel_name, aborted);
51   return 0;
52 }
53 
54 int Applier_channel_state_observer::
before_request_transmit(Binlog_relay_IO_param * param,uint32 flags)55 before_request_transmit(Binlog_relay_IO_param *param,
56                         uint32 flags)
57 {
58   return 0;
59 }
60 
61 int Applier_channel_state_observer::
after_read_event(Binlog_relay_IO_param * param,const char * packet,unsigned long len,const char ** event_buf,unsigned long * event_len)62 after_read_event(Binlog_relay_IO_param *param,
63                  const char *packet, unsigned long len,
64                  const char **event_buf,
65                  unsigned long *event_len)
66 {
67   return 0;
68 }
69 
70 int Applier_channel_state_observer::
after_queue_event(Binlog_relay_IO_param * param,const char * event_buf,unsigned long event_len,uint32 flags)71 after_queue_event(Binlog_relay_IO_param *param,
72                   const char *event_buf,
73                   unsigned long event_len,
74                   uint32 flags)
75 {
76   return 0;
77 }
78 
79 int Applier_channel_state_observer::
after_reset_slave(Binlog_relay_IO_param * param)80 after_reset_slave(Binlog_relay_IO_param *param)
81 {
82   return 0;
83 }
84