1 | /* Copyright (C) 2009-2017 Kentoku Shiba |
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 as published by |
5 | the Free Software Foundation; version 2 of the License. |
6 | |
7 | This program is distributed in the hope that it will be useful, |
8 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
10 | GNU General Public License for more details. |
11 | |
12 | You should have received a copy of the GNU General Public License |
13 | along with this program; if not, write to the Free Software |
14 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ |
15 | |
16 | SPIDER_TABLE_MON_LIST *spider_get_ping_table_mon_list( |
17 | SPIDER_TRX *trx, |
18 | THD *thd, |
19 | spider_string *str, |
20 | uint conv_name_length, |
21 | int link_idx, |
22 | char *static_link_id, |
23 | uint static_link_id_length, |
24 | uint32 server_id, |
25 | bool need_lock, |
26 | int *error_num |
27 | ); |
28 | |
29 | void spider_free_ping_table_mon_list( |
30 | SPIDER_TABLE_MON_LIST *table_mon_list |
31 | ); |
32 | |
33 | void spider_release_ping_table_mon_list_loop( |
34 | uint mutex_hash, |
35 | SPIDER_TABLE_MON_LIST *table_mon_list |
36 | ); |
37 | |
38 | int spider_release_ping_table_mon_list( |
39 | const char *conv_name, |
40 | uint conv_name_length, |
41 | int link_idx |
42 | ); |
43 | |
44 | int spider_get_ping_table_mon( |
45 | THD *thd, |
46 | SPIDER_TABLE_MON_LIST *table_mon_list, |
47 | char *name, |
48 | uint name_length, |
49 | int link_idx, |
50 | uint32 server_id, |
51 | MEM_ROOT *mem_root, |
52 | bool need_lock |
53 | ); |
54 | |
55 | SPIDER_TABLE_MON_LIST *spider_get_ping_table_tgt( |
56 | THD *thd, |
57 | char *name, |
58 | uint name_length, |
59 | int link_idx, |
60 | char *static_link_id, |
61 | uint static_link_id_length, |
62 | uint32 server_id, |
63 | spider_string *str, |
64 | bool need_lock, |
65 | int *error_num |
66 | ); |
67 | |
68 | SPIDER_CONN *spider_get_ping_table_tgt_conn( |
69 | SPIDER_TRX *trx, |
70 | SPIDER_SHARE *share, |
71 | int *error_num |
72 | ); |
73 | |
74 | int spider_get_ping_table_gtid_pos( |
75 | SPIDER_TRX *trx, |
76 | THD *thd, |
77 | spider_string *str, |
78 | uint conv_name_length, |
79 | int failed_link_idx, |
80 | uint32 server_id, |
81 | bool need_lock, |
82 | spider_string *tmp_str |
83 | ); |
84 | |
85 | int spider_init_ping_table_mon_cache( |
86 | THD *thd, |
87 | MEM_ROOT *mem_root, |
88 | bool need_lock |
89 | ); |
90 | |
91 | int spider_ping_table_cache_compare( |
92 | TABLE *table, |
93 | MEM_ROOT *mem_root |
94 | ); |
95 | |
96 | void spider_ping_table_free_mon_list( |
97 | SPIDER_TABLE_MON_LIST *table_mon_list |
98 | ); |
99 | |
100 | void spider_ping_table_free_mon( |
101 | SPIDER_TABLE_MON *table_mon |
102 | ); |
103 | |
104 | int spider_ping_table_mon_from_table( |
105 | SPIDER_TRX *trx, |
106 | THD *thd, |
107 | SPIDER_SHARE *share, |
108 | int base_link_idx, |
109 | uint32 server_id, |
110 | char *conv_name, |
111 | uint conv_name_length, |
112 | int link_idx, |
113 | char *where_clause, |
114 | uint where_clause_length, |
115 | long monitoring_kind, |
116 | longlong monitoring_limit, |
117 | long monitoring_flag, |
118 | bool need_lock |
119 | ); |
120 | |