1 | #ifndef SQL_SERVERS_INCLUDED |
2 | #define SQL_SERVERS_INCLUDED |
3 | |
4 | /* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. |
5 | |
6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; version 2 of the License. |
9 | |
10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. |
14 | |
15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ |
18 | |
19 | #include "slave.h" // for tables_ok(), rpl_filter |
20 | |
21 | class THD; |
22 | typedef struct st_lex_server_options LEX_SERVER_OPTIONS; |
23 | typedef struct st_mem_root MEM_ROOT; |
24 | |
25 | /* structs */ |
26 | typedef struct st_federated_server |
27 | { |
28 | const char *server_name; |
29 | long port; |
30 | size_t server_name_length; |
31 | const char *db, *scheme, *username, *password, *socket, *owner, *host, *sport; |
32 | } FOREIGN_SERVER; |
33 | |
34 | /* cache handlers */ |
35 | bool servers_init(bool dont_read_server_table); |
36 | bool servers_reload(THD *thd); |
37 | void servers_free(bool end=0); |
38 | |
39 | /* insert functions */ |
40 | int create_server(THD *thd, LEX_SERVER_OPTIONS *server_options); |
41 | |
42 | /* drop functions */ |
43 | int drop_server(THD *thd, LEX_SERVER_OPTIONS *server_options); |
44 | |
45 | /* update functions */ |
46 | int alter_server(THD *thd, LEX_SERVER_OPTIONS *server_options); |
47 | |
48 | /* lookup functions */ |
49 | FOREIGN_SERVER *get_server_by_name(MEM_ROOT *mem, const char *server_name, |
50 | FOREIGN_SERVER *server_buffer); |
51 | |
52 | #endif /* SQL_SERVERS_INCLUDED */ |
53 | |