summaryrefslogtreecommitdiff
path: root/storage/federatedx
diff options
context:
space:
mode:
authorAntony T Curtis <antony@xiphis.org>2009-11-14 11:33:59 -0800
committerAntony T Curtis <antony@xiphis.org>2009-11-14 11:33:59 -0800
commit343001d84054a4051d75bf56f131fc3bf140d59d (patch)
tree9b3e96546759a174f477047ea0bc4aa60cc249f8 /storage/federatedx
parent2f18347d5cd881fe1d88a387411bb01242748879 (diff)
parent8e814e1df794aa1cb9d85b83877706384fc17152 (diff)
downloadmariadb-git-343001d84054a4051d75bf56f131fc3bf140d59d.tar.gz
merge from maria-5.1-merge
Diffstat (limited to 'storage/federatedx')
-rw-r--r--storage/federatedx/CMakeFiles.txt5
-rw-r--r--storage/federatedx/CMakeLists.txt3
-rw-r--r--storage/federatedx/Makefile.am3
-rw-r--r--storage/federatedx/ha_federatedx.cc15
4 files changed, 15 insertions, 11 deletions
diff --git a/storage/federatedx/CMakeFiles.txt b/storage/federatedx/CMakeFiles.txt
deleted file mode 100644
index dd5a464b7c6..00000000000
--- a/storage/federatedx/CMakeFiles.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake")
-SET(FEDERATED_SOURCES ha_federatedx.cc
- federatedx_io.cc federatedx_io_mysql.cc federatedx_io_null.cc
- federatedx_txn.cc)
-MYSQL_STORAGE_ENGINE(FEDERATED)
diff --git a/storage/federatedx/CMakeLists.txt b/storage/federatedx/CMakeLists.txt
new file mode 100644
index 00000000000..1177e3b7b10
--- /dev/null
+++ b/storage/federatedx/CMakeLists.txt
@@ -0,0 +1,3 @@
+INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake")
+SET(FEDERATEDX_SOURCES ha_federatedx.cc federatedx_txn.cc federatedx_io.cc federatedx_io_null.cc federatedx_io_mysql.cc)
+MYSQL_STORAGE_ENGINE(FEDERATEDX)
diff --git a/storage/federatedx/Makefile.am b/storage/federatedx/Makefile.am
index 802f89d2321..ad1328247ec 100644
--- a/storage/federatedx/Makefile.am
+++ b/storage/federatedx/Makefile.am
@@ -22,7 +22,6 @@ pkgplugin_LTLIBRARIES = @plugin_federated_shared_target@
ha_federatedx_la_LDFLAGS = -module -rpath $(pkgplugindir)
ha_federatedx_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_federatedx_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
-ha_federatedx_la_SOURCES = ha_federatedx.cc
EXTRA_LIBRARIES = libfederatedx.a
@@ -34,7 +33,7 @@ libfederatedx_a_SOURCES= ha_federatedx.cc federatedx_txn.cc \
federatedx_io_mysql.cc
EXTRA_DIST = CMakeLists.txt plug.in ha_federatedx.h \
- federatedx_probes.d
+ federatedx_probes.h
ha_federatedx_la_SOURCES = ha_federatedx.cc federatedx_txn.cc \
federatedx_io.cc federatedx_io_null.cc \
diff --git a/storage/federatedx/ha_federatedx.cc b/storage/federatedx/ha_federatedx.cc
index c778080320c..629868f93e2 100644
--- a/storage/federatedx/ha_federatedx.cc
+++ b/storage/federatedx/ha_federatedx.cc
@@ -392,8 +392,8 @@ int federatedx_db_init(void *p)
DBUG_ENTER("federatedx_db_init");
handlerton *federatedx_hton= (handlerton *)p;
federatedx_hton->state= SHOW_OPTION_YES;
- /* This is no longer needed for plugin storage engines */
- federatedx_hton->db_type= DB_TYPE_DEFAULT;
+ /* Needed to work with old .frm files */
+ federatedx_hton->db_type= DB_TYPE_FEDERATED_DB;
federatedx_hton->savepoint_offset= sizeof(ulong);
federatedx_hton->close_connection= ha_federatedx::disconnect;
federatedx_hton->savepoint_set= ha_federatedx::savepoint_set;
@@ -1418,12 +1418,18 @@ static void fill_server(MEM_ROOT *mem_root, FEDERATEDX_SERVER *server,
database.reserve(database.length());
database.length(my_casedn_str(system_charset_info, database.c_ptr_safe()));
}
-
+
+#ifndef __WIN__
+ /*
+ TODO: there is no unix sockets under windows so the engine should be
+ revised about using sockets in such environment.
+ */
if (lower_case_file_system && socket.length())
{
socket.reserve(socket.length());
socket.length(my_casedn_str(files_charset_info, socket.c_ptr_safe()));
}
+#endif
/* start with all bytes zeroed */
bzero(server, sizeof(*server));
@@ -1788,13 +1794,14 @@ int ha_federatedx::close(void)
retval= free_result();
/* Disconnect from mysql */
- if ((txn= get_txn(thd, true)))
+ if (txn || thd && (txn= get_txn(thd, true)))
txn->release(&io);
DBUG_ASSERT(io == NULL);
if ((error= free_share(txn, share)))
retval= error;
+
DBUG_RETURN(retval);
}