My Project
sql_servers.h
00001 #ifndef SQL_SERVERS_INCLUDED
00002 #define SQL_SERVERS_INCLUDED
00003 
00004 /* Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; version 2 of the License.
00009 
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013    GNU General Public License for more details.
00014 
00015    You should have received a copy of the GNU General Public License
00016    along with this program; if not, write to the Free Software
00017    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
00018 
00019 #include "my_global.h"                  /* uint */
00020 #include "rpl_slave.h" // for tables_ok(), rpl_filter
00021 
00022 class THD;
00023 typedef struct st_lex_server_options LEX_SERVER_OPTIONS;
00024 typedef struct st_mem_root MEM_ROOT;
00025 
00026 /* structs */
00027 typedef struct st_federated_server
00028 {
00029   char *server_name;
00030   long port;
00031   uint server_name_length;
00032   char *db, *scheme, *username, *password, *socket, *owner, *host, *sport;
00033 } FOREIGN_SERVER;
00034 
00035 /* cache handlers */
00036 bool servers_init(bool dont_read_server_table);
00037 bool servers_reload(THD *thd);
00038 void servers_free(bool end=0);
00039 
00040 /* insert functions */
00041 bool create_server(THD *thd, LEX_SERVER_OPTIONS *server_options);
00042 
00043 /* drop functions */
00044 bool drop_server(THD *thd, LEX_SERVER_OPTIONS *server_options, bool if_exists);
00045 
00046 /* update functions */
00047 bool alter_server(THD *thd, LEX_SERVER_OPTIONS *server_options);
00048 
00049 /* lookup functions */
00050 FOREIGN_SERVER *get_server_by_name(MEM_ROOT *mem, const char *server_name,
00051                                    FOREIGN_SERVER *server_buffer);
00052 
00053 #endif /* SQL_SERVERS_INCLUDED */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines