1 | /* Copyright (C) 2013 Codership Oy <info@codership.com> |
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 along |
13 | with this program; if not, write to the Free Software Foundation, Inc., |
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ |
15 | |
16 | #include <my_config.h> |
17 | |
18 | #ifndef WSREP_THD_H |
19 | #define WSREP_THD_H |
20 | |
21 | #ifdef WITH_WSREP |
22 | |
23 | #include "sql_class.h" |
24 | |
25 | int wsrep_show_bf_aborts (THD *thd, SHOW_VAR *var, char *buff, |
26 | enum enum_var_type scope); |
27 | void wsrep_client_rollback(THD *thd); |
28 | void wsrep_replay_transaction(THD *thd); |
29 | void wsrep_create_appliers(long threads); |
30 | void wsrep_create_rollbacker(); |
31 | |
32 | int wsrep_abort_thd(void *bf_thd_ptr, void *victim_thd_ptr, |
33 | my_bool signal); |
34 | |
35 | /* |
36 | PA = Parallel Applying (on the slave side) |
37 | */ |
38 | extern void wsrep_thd_set_PA_safe(void *thd_ptr, my_bool safe); |
39 | extern my_bool wsrep_thd_is_BF(THD *thd, my_bool sync); |
40 | extern my_bool wsrep_thd_is_wsrep(void *thd_ptr); |
41 | |
42 | enum wsrep_conflict_state wsrep_thd_conflict_state(void *thd_ptr, my_bool sync); |
43 | extern "C" my_bool wsrep_thd_is_BF_or_commit(void *thd_ptr, my_bool sync); |
44 | extern "C" my_bool wsrep_thd_is_local(void *thd_ptr, my_bool sync); |
45 | extern "C" int wsrep_thd_in_locking_session(void *thd_ptr); |
46 | |
47 | #else /* WITH_WSREP */ |
48 | |
49 | #define wsrep_thd_is_BF(T, S) (0) |
50 | #define wsrep_abort_thd(X,Y,Z) do { } while(0) |
51 | #define wsrep_create_appliers(T) do { } while(0) |
52 | |
53 | #endif |
54 | #endif /* WSREP_THD_H */ |
55 | |