mariadb/sql/sql_servers.h

53 lines
1.7 KiB
C
Raw Normal View History

#ifndef SQL_SERVERS_INCLUDED
#define SQL_SERVERS_INCLUDED
2011-06-30 17:46:53 +02:00
/* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
WL# 3031 Backport of functionality in private 5.2 tree. Added new language to parser, new mysql.servers table and associated code to be used by the federated storage engine to allow central connection information per WL entry. libmysqld/Makefile.am: WL# 3031 Added sql_servers.cc to libmysqld Makefile.am mysql-test/lib/init_db.sql: WL# 3031 Added mysql.servers creation to init_db.sql, which is in turn called by mysql-test-run.pl scripts/mysql_create_system_tables.sh: WL# 3031 Added mysql.servers table creation to script called by non-perl mysql-test-run sql/Makefile.am: WL# 3031 Added sql_servers source and headers to Makefile.am to be built sql/lex.h: WL# 3031 Added tokens needed for SERVERS scheme sql/mysql_priv.h: WL #3031 Added sql_servers.h to mysql_priv.h so mysqld.cc and other code can link with sql_servers code sql/mysqld.cc: WL# 3031 Added servers_free and servers_init to mysqld sql/sql_lex.cc: WL# 3031 Added lex->server_options parameter initialisation sql/sql_lex.h: WL #3031 Added SQLCOM commands needed for sql_server actions sql/sql_parse.cc: WL# 3031 Added switch actions for new SQLCOM sql_server actions sql/sql_yacc.yy: WL #3031 Added tokens needed for sql_servers, CREATE/DROP/ALTER server functionality sql/share/errmsg.txt: WL# 3031 Added two new errors to errormsg.sys storage/federated/ha_federated.cc: WL #3031 Modified federated storage engine to use new connection scheme (servers table) if connection string only specifies connection name vs. complete URL storage/federated/ha_federated.h: WL# 3031 Added new share members needed for connection scheme sql/sql_servers.cc: WL #3031 sql_servers.cc - all methods required for manipulating mysql.servers table to work with federated new connection scheme (CREATE/ALTER/DROP SERVER ...) sql/sql_servers.h: WL #3031 New header file for sql_servers functionality mysql-test/r/federated_server.result: WL #3031 New test results for testing new connection scheme sql/sql_yacc.yy.bak: WL #3031 Added tokens and definitions required for new CREATE/ALTER/DROP SERVER for sql_servers functionality. See WL for details. mysql-test/t/federated_server.test: WL #3031 New test for testing CREATE/ALTER/DROP SERVER, as well as testing that federated works with both tradition connection scheme as well as new connection scheme.
2006-12-02 01:47:45 +01:00
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Many files: Changed header to GPL version 2 only client/mysqlslap.c: Changed header to GPL version 2 only include/atomic/nolock.h: Changed header to GPL version 2 only include/atomic/rwlock.h: Changed header to GPL version 2 only include/atomic/x86-gcc.h: Changed header to GPL version 2 only include/atomic/x86-msvc.h: Changed header to GPL version 2 only include/my_atomic.h: Changed header to GPL version 2 only include/my_trie.h: Changed header to GPL version 2 only include/my_vle.h: Changed header to GPL version 2 only include/mysql/plugin.h: Changed header to GPL version 2 only mysys/my_atomic.c: Changed header to GPL version 2 only mysys/my_getncpus.c: Changed header to GPL version 2 only mysys/my_memmem.c: Changed header to GPL version 2 only mysys/my_vle.c: Changed header to GPL version 2 only mysys/trie.c: Changed header to GPL version 2 only plugin/Makefile.am: Changed header to GPL version 2 only server-tools/instance-manager/IMService.h: Changed header to GPL version 2 only server-tools/instance-manager/WindowsService.h: Changed header to GPL version 2 only server-tools/instance-manager/exit_codes.h: Changed header to GPL version 2 only server-tools/instance-manager/user_management_commands.h: Changed header to GPL version 2 only sql/authors.h: Changed header to GPL version 2 only sql/contributors.h: Changed header to GPL version 2 only sql/event_data_objects.cc: Changed header to GPL version 2 only sql/event_data_objects.h: Changed header to GPL version 2 only sql/event_db_repository.cc: Changed header to GPL version 2 only sql/event_db_repository.h: Changed header to GPL version 2 only sql/event_queue.cc: Changed header to GPL version 2 only sql/event_queue.h: Changed header to GPL version 2 only sql/event_scheduler.cc: Changed header to GPL version 2 only sql/event_scheduler.h: Changed header to GPL version 2 only sql/events.cc: Changed header to GPL version 2 only sql/events.h: Changed header to GPL version 2 only sql/ha_ndbcluster_binlog.cc: Changed header to GPL version 2 only sql/ha_ndbcluster_binlog.h: Changed header to GPL version 2 only sql/ha_ndbcluster_tables.h: Changed header to GPL version 2 only sql/ha_partition.cc: Changed header to GPL version 2 only sql/ha_partition.h: Changed header to GPL version 2 only sql/item_xmlfunc.cc: Changed header to GPL version 2 only sql/item_xmlfunc.h: Changed header to GPL version 2 only sql/log.h: Changed header to GPL version 2 only sql/partition_element.h: Changed header to GPL version 2 only sql/partition_info.cc: Changed header to GPL version 2 only sql/partition_info.h: Changed header to GPL version 2 only sql/rpl_filter.cc: Changed header to GPL version 2 only sql/rpl_filter.h: Changed header to GPL version 2 only sql/rpl_injector.cc: Changed header to GPL version 2 only sql/rpl_injector.h: Changed header to GPL version 2 only sql/rpl_mi.cc: Changed header to GPL version 2 only sql/rpl_mi.h: Changed header to GPL version 2 only sql/rpl_rli.cc: Changed header to GPL version 2 only sql/rpl_rli.h: Changed header to GPL version 2 only sql/rpl_tblmap.cc: Changed header to GPL version 2 only sql/rpl_tblmap.h: Changed header to GPL version 2 only sql/rpl_utility.cc: Changed header to GPL version 2 only sql/rpl_utility.h: Changed header to GPL version 2 only sql/sql_binlog.cc: Changed header to GPL version 2 only sql/sql_partition.cc: Changed header to GPL version 2 only sql/sql_partition.h: Changed header to GPL version 2 only sql/sql_plugin.cc: Changed header to GPL version 2 only sql/sql_plugin.h: Changed header to GPL version 2 only sql/sql_servers.cc: Changed header to GPL version 2 only sql/sql_servers.h: Changed header to GPL version 2 only sql/sql_tablespace.cc: Changed header to GPL version 2 only sql/sql_yacc.yy.bak: Changed header to GPL version 2 only storage/Makefile.am: Changed header to GPL version 2 only storage/archive/Makefile.am: Changed header to GPL version 2 only storage/blackhole/Makefile.am: Changed header to GPL version 2 only storage/csv/Makefile.am: Changed header to GPL version 2 only storage/example/Makefile.am: Changed header to GPL version 2 only storage/federated/Makefile.am: Changed header to GPL version 2 only storage/innobase/handler/Makefile.am: Changed header to GPL version 2 only storage/ndb/include/kernel/signaldata/AllocNodeId.hpp: Changed header to GPL version 2 only storage/ndb/include/kernel/signaldata/CreateFilegroup.hpp: Changed header to GPL version 2 only storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp: Changed header to GPL version 2 only storage/ndb/include/kernel/signaldata/CreateObj.hpp: Changed header to GPL version 2 only storage/ndb/include/kernel/signaldata/DictObjOp.hpp: Changed header to GPL version 2 only storage/ndb/include/kernel/signaldata/DihFragCount.hpp: Changed header to GPL version 2 only storage/ndb/include/kernel/signaldata/DropFilegroup.hpp: Changed header to GPL version 2 only storage/ndb/include/kernel/signaldata/DropFilegroupImpl.hpp: Changed header to GPL version 2 only storage/ndb/include/kernel/signaldata/DropObj.hpp: Changed header to GPL version 2 only storage/ndb/include/kernel/signaldata/Extent.hpp: Changed header to GPL version 2 only storage/ndb/include/kernel/signaldata/LgmanContinueB.hpp: Changed header to GPL version 2 only storage/ndb/include/kernel/signaldata/PgmanContinueB.hpp: Changed header to GPL version 2 only storage/ndb/include/kernel/signaldata/RestoreContinueB.hpp: Changed header to GPL version 2 only storage/ndb/include/kernel/signaldata/RestoreImpl.hpp: Changed header to GPL version 2 only storage/ndb/include/kernel/signaldata/RouteOrd.hpp: Changed header to GPL version 2 only storage/ndb/include/kernel/signaldata/TsmanContinueB.hpp: Changed header to GPL version 2 only storage/ndb/include/ndbapi/NdbIndexStat.hpp: Changed header to GPL version 2 only storage/ndb/ndbapi-examples/mgmapi_logevent/mgmapi_logevent.cpp: Changed header to GPL version 2 only storage/ndb/ndbapi-examples/mgmapi_logevent_dual/mgmapi_logevent_dual.cpp: Changed header to GPL version 2 only storage/ndb/ndbapi-examples/ndbapi_async/ndbapi_async.cpp: Changed header to GPL version 2 only storage/ndb/ndbapi-examples/ndbapi_async1/ndbapi_async1.cpp: Changed header to GPL version 2 only storage/ndb/ndbapi-examples/ndbapi_event/ndbapi_event.cpp: Changed header to GPL version 2 only storage/ndb/ndbapi-examples/ndbapi_retries/ndbapi_retries.cpp: Changed header to GPL version 2 only storage/ndb/ndbapi-examples/ndbapi_scan/ndbapi_scan.cpp: Changed header to GPL version 2 only storage/ndb/ndbapi-examples/ndbapi_simple/ndbapi_simple.cpp: Changed header to GPL version 2 only storage/ndb/ndbapi-examples/ndbapi_simple_dual/ndbapi_simple_dual.cpp: Changed header to GPL version 2 only storage/ndb/ndbapi-examples/ndbapi_simple_index/ndbapi_simple_index.cpp: Changed header to GPL version 2 only storage/ndb/src/kernel/blocks/dbdih/printSysfile.cpp: Changed header to GPL version 2 only storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp: Changed header to GPL version 2 only storage/ndb/src/kernel/blocks/dbtup/DbtupVarAlloc.cpp: Changed header to GPL version 2 only storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.cpp: Changed header to GPL version 2 only storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.hpp: Changed header to GPL version 2 only storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp: Changed header to GPL version 2 only storage/ndb/src/kernel/blocks/dbtup/tuppage.hpp: Changed header to GPL version 2 only storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp: Changed header to GPL version 2 only storage/ndb/src/kernel/blocks/diskpage.hpp: Changed header to GPL version 2 only storage/ndb/src/kernel/blocks/lgman.cpp: Changed header to GPL version 2 only storage/ndb/src/kernel/blocks/lgman.hpp: Changed header to GPL version 2 only storage/ndb/src/kernel/blocks/pgman.cpp: Changed header to GPL version 2 only storage/ndb/src/kernel/blocks/pgman.hpp: Changed header to GPL version 2 only storage/ndb/src/kernel/blocks/print_file.cpp: Changed header to GPL version 2 only storage/ndb/src/kernel/blocks/record_types.hpp: Changed header to GPL version 2 only storage/ndb/src/kernel/blocks/restore.cpp: Changed header to GPL version 2 only storage/ndb/src/kernel/blocks/restore.hpp: Changed header to GPL version 2 only storage/ndb/src/kernel/blocks/tsman.cpp: Changed header to GPL version 2 only storage/ndb/src/kernel/blocks/tsman.hpp: Changed header to GPL version 2 only storage/ndb/src/kernel/vm/DLCFifoList.hpp: Changed header to GPL version 2 only storage/ndb/src/kernel/vm/DLCHashTable.hpp: Changed header to GPL version 2 only storage/ndb/src/kernel/vm/DynArr256.cpp: Changed header to GPL version 2 only storage/ndb/src/kernel/vm/DynArr256.hpp: Changed header to GPL version 2 only storage/ndb/src/kernel/vm/KeyTable2Ref.hpp: Changed header to GPL version 2 only storage/ndb/src/kernel/vm/LinearPool.hpp: Changed header to GPL version 2 only storage/ndb/src/kernel/vm/NdbdSuperPool.cpp: Changed header to GPL version 2 only storage/ndb/src/kernel/vm/NdbdSuperPool.hpp: Changed header to GPL version 2 only storage/ndb/src/kernel/vm/Pool.cpp: Changed header to GPL version 2 only storage/ndb/src/kernel/vm/Pool.hpp: Changed header to GPL version 2 only storage/ndb/src/kernel/vm/RWPool.cpp: Changed header to GPL version 2 only storage/ndb/src/kernel/vm/RWPool.hpp: Changed header to GPL version 2 only storage/ndb/src/kernel/vm/Rope.hpp: Changed header to GPL version 2 only storage/ndb/src/kernel/vm/SLFifoList.hpp: Changed header to GPL version 2 only storage/ndb/src/kernel/vm/WOPool.cpp: Changed header to GPL version 2 only storage/ndb/src/kernel/vm/WOPool.hpp: Changed header to GPL version 2 only storage/ndb/src/kernel/vm/bench_pool.cpp: Changed header to GPL version 2 only storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp: Changed header to GPL version 2 only storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp: Changed header to GPL version 2 only storage/ndb/src/mgmsrv/ParamInfo.cpp: Changed header to GPL version 2 only storage/ndb/src/ndbapi/NdbIndexStat.cpp: Changed header to GPL version 2 only storage/ndb/test/ndbapi/testIndexStat.cpp: Changed header to GPL version 2 only storage/ndb/test/tools/listen.cpp: Changed header to GPL version 2 only storage/ndb/tools/restore/ndb_nodegroup_map.h: Changed header to GPL version 2 only strings/my_strchr.c: Changed header to GPL version 2 only unittest/mysys/base64-t.c: Changed header to GPL version 2 only unittest/mysys/bitmap-t.c: Changed header to GPL version 2 only unittest/mysys/my_atomic-t.c: Changed header to GPL version 2 only unittest/mytap/tap.c: Changed header to GPL version 2 only unittest/mytap/tap.h: Changed header to GPL version 2 only win/Makefile.am: Changed header to GPL version 2 only
2006-12-27 02:23:51 +01:00
the Free Software Foundation; version 2 of the License.
WL# 3031 Backport of functionality in private 5.2 tree. Added new language to parser, new mysql.servers table and associated code to be used by the federated storage engine to allow central connection information per WL entry. libmysqld/Makefile.am: WL# 3031 Added sql_servers.cc to libmysqld Makefile.am mysql-test/lib/init_db.sql: WL# 3031 Added mysql.servers creation to init_db.sql, which is in turn called by mysql-test-run.pl scripts/mysql_create_system_tables.sh: WL# 3031 Added mysql.servers table creation to script called by non-perl mysql-test-run sql/Makefile.am: WL# 3031 Added sql_servers source and headers to Makefile.am to be built sql/lex.h: WL# 3031 Added tokens needed for SERVERS scheme sql/mysql_priv.h: WL #3031 Added sql_servers.h to mysql_priv.h so mysqld.cc and other code can link with sql_servers code sql/mysqld.cc: WL# 3031 Added servers_free and servers_init to mysqld sql/sql_lex.cc: WL# 3031 Added lex->server_options parameter initialisation sql/sql_lex.h: WL #3031 Added SQLCOM commands needed for sql_server actions sql/sql_parse.cc: WL# 3031 Added switch actions for new SQLCOM sql_server actions sql/sql_yacc.yy: WL #3031 Added tokens needed for sql_servers, CREATE/DROP/ALTER server functionality sql/share/errmsg.txt: WL# 3031 Added two new errors to errormsg.sys storage/federated/ha_federated.cc: WL #3031 Modified federated storage engine to use new connection scheme (servers table) if connection string only specifies connection name vs. complete URL storage/federated/ha_federated.h: WL# 3031 Added new share members needed for connection scheme sql/sql_servers.cc: WL #3031 sql_servers.cc - all methods required for manipulating mysql.servers table to work with federated new connection scheme (CREATE/ALTER/DROP SERVER ...) sql/sql_servers.h: WL #3031 New header file for sql_servers functionality mysql-test/r/federated_server.result: WL #3031 New test results for testing new connection scheme sql/sql_yacc.yy.bak: WL #3031 Added tokens and definitions required for new CREATE/ALTER/DROP SERVER for sql_servers functionality. See WL for details. mysql-test/t/federated_server.test: WL #3031 New test for testing CREATE/ALTER/DROP SERVER, as well as testing that federated works with both tradition connection scheme as well as new connection scheme.
2006-12-02 01:47:45 +01:00
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Many files: Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header Added GPL copyright text my_vle.h, rpl_utility.h, my_vle.c, base64-t.c, rpl_utility.cc: Changed copyright header formatting some plugin_example.c, daemon_example.c: Added "Copyright (C) 2006 MySQL AB" to GPL header CMakeLists.txt: Added GPL copyright text client/CMakeLists.txt: Added GPL copyright text dbug/CMakeLists.txt: Added GPL copyright text extra/CMakeLists.txt: Added GPL copyright text extra/yassl/CMakeLists.txt: Added GPL copyright text extra/yassl/taocrypt/CMakeLists.txt: Added GPL copyright text libmysql/CMakeLists.txt: Added GPL copyright text libmysqld/CMakeLists.txt: Added GPL copyright text libmysqld/examples/CMakeLists.txt: Added GPL copyright text mysys/CMakeLists.txt: Added GPL copyright text regex/CMakeLists.txt: Added GPL copyright text server-tools/instance-manager/CMakeLists.txt: Added GPL copyright text sql/CMakeLists.txt: Added GPL copyright text storage/archive/CMakeLists.txt: Added GPL copyright text storage/blackhole/CMakeLists.txt: Added GPL copyright text storage/csv/CMakeLists.txt: Added GPL copyright text storage/example/CMakeLists.txt: Added GPL copyright text storage/federated/CMakeLists.txt: Added GPL copyright text storage/heap/CMakeLists.txt: Added GPL copyright text storage/innobase/CMakeLists.txt: Added GPL copyright text storage/myisam/CMakeLists.txt: Added GPL copyright text storage/myisammrg/CMakeLists.txt: Added GPL copyright text strings/CMakeLists.txt: Added GPL copyright text tests/CMakeLists.txt: Added GPL copyright text vio/CMakeLists.txt: Added GPL copyright text zlib/CMakeLists.txt: Added GPL copyright text include/my_vle.h: Changed copyright header formatting some mysys/my_vle.c: Changed copyright header formatting some plugin/daemon_example/daemon_example.c: Added "Copyright (C) 2006 MySQL AB" to GPL header plugin/fulltext/plugin_example.c: Added "Copyright (C) 2006 MySQL AB" to GPL header plugin/Makefile.am: Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header sql/authors.h: Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header sql/contributors.h: Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header sql/item_xmlfunc.cc: Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header sql/partition_element.h: Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header sql/partition_info.h: Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header sql/rpl_injector.cc: Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header sql/rpl_injector.h: Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header sql/sql_binlog.cc: Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header sql/sql_servers.h: Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header storage/Makefile.am: Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header storage/archive/Makefile.am: Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header storage/blackhole/Makefile.am: Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header storage/csv/Makefile.am: Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header storage/example/Makefile.am: Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header storage/federated/Makefile.am: Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header win/Makefile.am: Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header sql/rpl_utility.cc: Changed copyright header formatting some sql/rpl_utility.h: Changed copyright header formatting some unittest/mysys/base64-t.c: Changed copyright header formatting some include/my_uctype.h: Added GPL copyright text plugin/daemon_example/Makefile.am: Added GPL copyright text plugin/fulltext/Makefile.am: Added GPL copyright text scripts/make_win_bin_dist: Added GPL copyright text server-tools/instance-manager/user_management_commands.cc: Added GPL copyright text sql/sql_builtin.cc.in: Added GPL copyright text sql/sql_show.h: Added GPL copyright text storage/archive/archive_test.c: Added GPL copyright text storage/ndb/src/kernel/blocks/dbtup/test_varpage.cpp: Added GPL copyright text storage/ndb/src/kernel/blocks/diskpage.cpp: Added GPL copyright text storage/ndb/src/kernel/vm/Rope.cpp: Added GPL copyright text storage/ndb/src/mgmsrv/ParamInfo.hpp: Added GPL copyright text strings/uctypedump.c: Added GPL copyright text unittest/Makefile.am: Added GPL copyright text unittest/examples/Makefile.am: Added GPL copyright text unittest/examples/core-t.c: Added GPL copyright text unittest/examples/no_plan-t.c: Added GPL copyright text unittest/examples/simple-t.c: Added GPL copyright text unittest/examples/skip-t.c: Added GPL copyright text unittest/examples/skip_all-t.c: Added GPL copyright text unittest/examples/todo-t.c: Added GPL copyright text unittest/mysys/Makefile.am: Added GPL copyright text unittest/mytap/Makefile.am: Added GPL copyright text unittest/mytap/t/Makefile.am: Added GPL copyright text unittest/mytap/t/basic-t.c: Added GPL copyright text unittest/unit.pl: Added GPL copyright text win/build-vs71.bat: Added GPL copyright text win/build-vs8.bat: Added GPL copyright text win/configure.js: Added GPL copyright text
2006-12-31 02:29:11 +01:00
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
WL# 3031 Backport of functionality in private 5.2 tree. Added new language to parser, new mysql.servers table and associated code to be used by the federated storage engine to allow central connection information per WL entry. libmysqld/Makefile.am: WL# 3031 Added sql_servers.cc to libmysqld Makefile.am mysql-test/lib/init_db.sql: WL# 3031 Added mysql.servers creation to init_db.sql, which is in turn called by mysql-test-run.pl scripts/mysql_create_system_tables.sh: WL# 3031 Added mysql.servers table creation to script called by non-perl mysql-test-run sql/Makefile.am: WL# 3031 Added sql_servers source and headers to Makefile.am to be built sql/lex.h: WL# 3031 Added tokens needed for SERVERS scheme sql/mysql_priv.h: WL #3031 Added sql_servers.h to mysql_priv.h so mysqld.cc and other code can link with sql_servers code sql/mysqld.cc: WL# 3031 Added servers_free and servers_init to mysqld sql/sql_lex.cc: WL# 3031 Added lex->server_options parameter initialisation sql/sql_lex.h: WL #3031 Added SQLCOM commands needed for sql_server actions sql/sql_parse.cc: WL# 3031 Added switch actions for new SQLCOM sql_server actions sql/sql_yacc.yy: WL #3031 Added tokens needed for sql_servers, CREATE/DROP/ALTER server functionality sql/share/errmsg.txt: WL# 3031 Added two new errors to errormsg.sys storage/federated/ha_federated.cc: WL #3031 Modified federated storage engine to use new connection scheme (servers table) if connection string only specifies connection name vs. complete URL storage/federated/ha_federated.h: WL# 3031 Added new share members needed for connection scheme sql/sql_servers.cc: WL #3031 sql_servers.cc - all methods required for manipulating mysql.servers table to work with federated new connection scheme (CREATE/ALTER/DROP SERVER ...) sql/sql_servers.h: WL #3031 New header file for sql_servers functionality mysql-test/r/federated_server.result: WL #3031 New test results for testing new connection scheme sql/sql_yacc.yy.bak: WL #3031 Added tokens and definitions required for new CREATE/ALTER/DROP SERVER for sql_servers functionality. See WL for details. mysql-test/t/federated_server.test: WL #3031 New test for testing CREATE/ALTER/DROP SERVER, as well as testing that federated works with both tradition connection scheme as well as new connection scheme.
2006-12-02 01:47:45 +01:00
#include "slave.h" // for tables_ok(), rpl_filter
class THD;
typedef struct st_lex_server_options LEX_SERVER_OPTIONS;
typedef struct st_mem_root MEM_ROOT;
WL# 3031 Backport of functionality in private 5.2 tree. Added new language to parser, new mysql.servers table and associated code to be used by the federated storage engine to allow central connection information per WL entry. libmysqld/Makefile.am: WL# 3031 Added sql_servers.cc to libmysqld Makefile.am mysql-test/lib/init_db.sql: WL# 3031 Added mysql.servers creation to init_db.sql, which is in turn called by mysql-test-run.pl scripts/mysql_create_system_tables.sh: WL# 3031 Added mysql.servers table creation to script called by non-perl mysql-test-run sql/Makefile.am: WL# 3031 Added sql_servers source and headers to Makefile.am to be built sql/lex.h: WL# 3031 Added tokens needed for SERVERS scheme sql/mysql_priv.h: WL #3031 Added sql_servers.h to mysql_priv.h so mysqld.cc and other code can link with sql_servers code sql/mysqld.cc: WL# 3031 Added servers_free and servers_init to mysqld sql/sql_lex.cc: WL# 3031 Added lex->server_options parameter initialisation sql/sql_lex.h: WL #3031 Added SQLCOM commands needed for sql_server actions sql/sql_parse.cc: WL# 3031 Added switch actions for new SQLCOM sql_server actions sql/sql_yacc.yy: WL #3031 Added tokens needed for sql_servers, CREATE/DROP/ALTER server functionality sql/share/errmsg.txt: WL# 3031 Added two new errors to errormsg.sys storage/federated/ha_federated.cc: WL #3031 Modified federated storage engine to use new connection scheme (servers table) if connection string only specifies connection name vs. complete URL storage/federated/ha_federated.h: WL# 3031 Added new share members needed for connection scheme sql/sql_servers.cc: WL #3031 sql_servers.cc - all methods required for manipulating mysql.servers table to work with federated new connection scheme (CREATE/ALTER/DROP SERVER ...) sql/sql_servers.h: WL #3031 New header file for sql_servers functionality mysql-test/r/federated_server.result: WL #3031 New test results for testing new connection scheme sql/sql_yacc.yy.bak: WL #3031 Added tokens and definitions required for new CREATE/ALTER/DROP SERVER for sql_servers functionality. See WL for details. mysql-test/t/federated_server.test: WL #3031 New test for testing CREATE/ALTER/DROP SERVER, as well as testing that federated works with both tradition connection scheme as well as new connection scheme.
2006-12-02 01:47:45 +01:00
/* structs */
typedef struct st_federated_server
{
const char *server_name;
WL# 3031 Backport of functionality in private 5.2 tree. Added new language to parser, new mysql.servers table and associated code to be used by the federated storage engine to allow central connection information per WL entry. libmysqld/Makefile.am: WL# 3031 Added sql_servers.cc to libmysqld Makefile.am mysql-test/lib/init_db.sql: WL# 3031 Added mysql.servers creation to init_db.sql, which is in turn called by mysql-test-run.pl scripts/mysql_create_system_tables.sh: WL# 3031 Added mysql.servers table creation to script called by non-perl mysql-test-run sql/Makefile.am: WL# 3031 Added sql_servers source and headers to Makefile.am to be built sql/lex.h: WL# 3031 Added tokens needed for SERVERS scheme sql/mysql_priv.h: WL #3031 Added sql_servers.h to mysql_priv.h so mysqld.cc and other code can link with sql_servers code sql/mysqld.cc: WL# 3031 Added servers_free and servers_init to mysqld sql/sql_lex.cc: WL# 3031 Added lex->server_options parameter initialisation sql/sql_lex.h: WL #3031 Added SQLCOM commands needed for sql_server actions sql/sql_parse.cc: WL# 3031 Added switch actions for new SQLCOM sql_server actions sql/sql_yacc.yy: WL #3031 Added tokens needed for sql_servers, CREATE/DROP/ALTER server functionality sql/share/errmsg.txt: WL# 3031 Added two new errors to errormsg.sys storage/federated/ha_federated.cc: WL #3031 Modified federated storage engine to use new connection scheme (servers table) if connection string only specifies connection name vs. complete URL storage/federated/ha_federated.h: WL# 3031 Added new share members needed for connection scheme sql/sql_servers.cc: WL #3031 sql_servers.cc - all methods required for manipulating mysql.servers table to work with federated new connection scheme (CREATE/ALTER/DROP SERVER ...) sql/sql_servers.h: WL #3031 New header file for sql_servers functionality mysql-test/r/federated_server.result: WL #3031 New test results for testing new connection scheme sql/sql_yacc.yy.bak: WL #3031 Added tokens and definitions required for new CREATE/ALTER/DROP SERVER for sql_servers functionality. See WL for details. mysql-test/t/federated_server.test: WL #3031 New test for testing CREATE/ALTER/DROP SERVER, as well as testing that federated works with both tradition connection scheme as well as new connection scheme.
2006-12-02 01:47:45 +01:00
long port;
uint server_name_length;
const char *db, *scheme, *username, *password, *socket, *owner, *host, *sport;
WL# 3031 Backport of functionality in private 5.2 tree. Added new language to parser, new mysql.servers table and associated code to be used by the federated storage engine to allow central connection information per WL entry. libmysqld/Makefile.am: WL# 3031 Added sql_servers.cc to libmysqld Makefile.am mysql-test/lib/init_db.sql: WL# 3031 Added mysql.servers creation to init_db.sql, which is in turn called by mysql-test-run.pl scripts/mysql_create_system_tables.sh: WL# 3031 Added mysql.servers table creation to script called by non-perl mysql-test-run sql/Makefile.am: WL# 3031 Added sql_servers source and headers to Makefile.am to be built sql/lex.h: WL# 3031 Added tokens needed for SERVERS scheme sql/mysql_priv.h: WL #3031 Added sql_servers.h to mysql_priv.h so mysqld.cc and other code can link with sql_servers code sql/mysqld.cc: WL# 3031 Added servers_free and servers_init to mysqld sql/sql_lex.cc: WL# 3031 Added lex->server_options parameter initialisation sql/sql_lex.h: WL #3031 Added SQLCOM commands needed for sql_server actions sql/sql_parse.cc: WL# 3031 Added switch actions for new SQLCOM sql_server actions sql/sql_yacc.yy: WL #3031 Added tokens needed for sql_servers, CREATE/DROP/ALTER server functionality sql/share/errmsg.txt: WL# 3031 Added two new errors to errormsg.sys storage/federated/ha_federated.cc: WL #3031 Modified federated storage engine to use new connection scheme (servers table) if connection string only specifies connection name vs. complete URL storage/federated/ha_federated.h: WL# 3031 Added new share members needed for connection scheme sql/sql_servers.cc: WL #3031 sql_servers.cc - all methods required for manipulating mysql.servers table to work with federated new connection scheme (CREATE/ALTER/DROP SERVER ...) sql/sql_servers.h: WL #3031 New header file for sql_servers functionality mysql-test/r/federated_server.result: WL #3031 New test results for testing new connection scheme sql/sql_yacc.yy.bak: WL #3031 Added tokens and definitions required for new CREATE/ALTER/DROP SERVER for sql_servers functionality. See WL for details. mysql-test/t/federated_server.test: WL #3031 New test for testing CREATE/ALTER/DROP SERVER, as well as testing that federated works with both tradition connection scheme as well as new connection scheme.
2006-12-02 01:47:45 +01:00
} FOREIGN_SERVER;
/* cache handlers */
bool servers_init(bool dont_read_server_table);
bool servers_reload(THD *thd);
WL# 3031 Backport of functionality in private 5.2 tree. Added new language to parser, new mysql.servers table and associated code to be used by the federated storage engine to allow central connection information per WL entry. libmysqld/Makefile.am: WL# 3031 Added sql_servers.cc to libmysqld Makefile.am mysql-test/lib/init_db.sql: WL# 3031 Added mysql.servers creation to init_db.sql, which is in turn called by mysql-test-run.pl scripts/mysql_create_system_tables.sh: WL# 3031 Added mysql.servers table creation to script called by non-perl mysql-test-run sql/Makefile.am: WL# 3031 Added sql_servers source and headers to Makefile.am to be built sql/lex.h: WL# 3031 Added tokens needed for SERVERS scheme sql/mysql_priv.h: WL #3031 Added sql_servers.h to mysql_priv.h so mysqld.cc and other code can link with sql_servers code sql/mysqld.cc: WL# 3031 Added servers_free and servers_init to mysqld sql/sql_lex.cc: WL# 3031 Added lex->server_options parameter initialisation sql/sql_lex.h: WL #3031 Added SQLCOM commands needed for sql_server actions sql/sql_parse.cc: WL# 3031 Added switch actions for new SQLCOM sql_server actions sql/sql_yacc.yy: WL #3031 Added tokens needed for sql_servers, CREATE/DROP/ALTER server functionality sql/share/errmsg.txt: WL# 3031 Added two new errors to errormsg.sys storage/federated/ha_federated.cc: WL #3031 Modified federated storage engine to use new connection scheme (servers table) if connection string only specifies connection name vs. complete URL storage/federated/ha_federated.h: WL# 3031 Added new share members needed for connection scheme sql/sql_servers.cc: WL #3031 sql_servers.cc - all methods required for manipulating mysql.servers table to work with federated new connection scheme (CREATE/ALTER/DROP SERVER ...) sql/sql_servers.h: WL #3031 New header file for sql_servers functionality mysql-test/r/federated_server.result: WL #3031 New test results for testing new connection scheme sql/sql_yacc.yy.bak: WL #3031 Added tokens and definitions required for new CREATE/ALTER/DROP SERVER for sql_servers functionality. See WL for details. mysql-test/t/federated_server.test: WL #3031 New test for testing CREATE/ALTER/DROP SERVER, as well as testing that federated works with both tradition connection scheme as well as new connection scheme.
2006-12-02 01:47:45 +01:00
void servers_free(bool end=0);
/* insert functions */
int create_server(THD *thd, LEX_SERVER_OPTIONS *server_options);
/* drop functions */
int drop_server(THD *thd, LEX_SERVER_OPTIONS *server_options);
/* update functions */
int alter_server(THD *thd, LEX_SERVER_OPTIONS *server_options);
/* lookup functions */
BUG#26257 New Federated Server Functionality Doesn't support differently named tables * Modified Federated memory allocation to use MEM_ROOT * Modified sql_servers and federated to allocate share connection parameters to use MEM_ROOT * Modified Federated to allow tablename in addition to server name * Implicit flushing of tables using altered/dropped server name * Added tests to prove new functionality works Contributors to this patch: Patrick Galbraith, Antony Curtis mysql-test/r/federated_server.result: BUG #26257 New Federated Server Functionality Doesn't support differently named tables New test results mysql-test/t/federated_server.test: BUG #26257 New Federated Server Functionality Doesn't support differently named tables New test which ensures that one can use the new 'create server' functionality and have tables point to the correct table, using CONNECTION='server', CONNECTION="server/tablename" and CONNECTION="mysql://...url" sql/mysql_priv.h: BUG #26257 New Federated Server Functionality Doesn't support differently named tables new function: close_cached_connection_tables() sql/sql_base.cc: BUG #26257 New Federated Server Functionality Doesn't support differently named tables new function: close_cached_connection_tables() closes all open tables which match connection string provides functionality to allow flushing of altered/dropped server names. sql/sql_servers.cc: BUG #26257 New Federated Server Functionality Doesn't support differently named tables * Added function clone_server() to allocate a new server for use by get_server_by_name() when creating a federated table * Now using MEM_ROOT allocation (mark and sweep) to account for meta data parameters being allocated properly, particularly with regards to to SERVER object. Also cleans up code allocating share. * Tables using the old definition of server name are now flushed on successful execution of ALTER/DROP SERVER. style: fixed some line-wrapping sql/sql_servers.h: BUG #26257 New Federated Server Functionality Doesn't support differently named tables * change in prototype to get_server_by_name() caller can now provide mem_root which strings will be copied in to. storage/federated/ha_federated.cc: BUG #26257 New Federated Server Functionality Doesn't support differently named tables * Simplified share and share member memory allocaton to use MEM_ROOT * Modified parse_url to parse table names along with server names storage/federated/ha_federated.h: BUG #26257 New Federated Server Functionality Doesn't support differently named tables * Added MEM_ROOT share member
2007-03-24 09:18:19 +01:00
FOREIGN_SERVER *get_server_by_name(MEM_ROOT *mem, const char *server_name,
FOREIGN_SERVER *server_buffer);
#endif /* SQL_SERVERS_INCLUDED */