MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sql_servers.h
1 #ifndef SQL_SERVERS_INCLUDED
2 #define SQL_SERVERS_INCLUDED
3 
4 /* Copyright (c) 2006, 2012, 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 "my_global.h" /* uint */
20 #include "rpl_slave.h" // for tables_ok(), rpl_filter
21 
22 class THD;
23 typedef struct st_lex_server_options LEX_SERVER_OPTIONS;
24 typedef struct st_mem_root MEM_ROOT;
25 
26 /* structs */
27 typedef struct st_federated_server
28 {
29  char *server_name;
30  long port;
31  uint server_name_length;
32  char *db, *scheme, *username, *password, *socket, *owner, *host, *sport;
34 
35 /* cache handlers */
36 bool servers_init(bool dont_read_server_table);
37 bool servers_reload(THD *thd);
38 void servers_free(bool end=0);
39 
40 /* insert functions */
41 bool create_server(THD *thd, LEX_SERVER_OPTIONS *server_options);
42 
43 /* drop functions */
44 bool drop_server(THD *thd, LEX_SERVER_OPTIONS *server_options, bool if_exists);
45 
46 /* update functions */
47 bool alter_server(THD *thd, LEX_SERVER_OPTIONS *server_options);
48 
49 /* lookup functions */
50 FOREIGN_SERVER *get_server_by_name(MEM_ROOT *mem, const char *server_name,
51  FOREIGN_SERVER *server_buffer);
52 
53 #endif /* SQL_SERVERS_INCLUDED */