summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
Diffstat (limited to 'libmysqld')
-rw-r--r--libmysqld/CMakeLists.txt11
-rw-r--r--libmysqld/Makefile.am8
-rw-r--r--libmysqld/lib_sql.cc25
-rw-r--r--libmysqld/libmysqld.def1
4 files changed, 36 insertions, 9 deletions
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt
index db398258b69..332dd206e15 100644
--- a/libmysqld/CMakeLists.txt
+++ b/libmysqld/CMakeLists.txt
@@ -87,9 +87,8 @@ FOREACH(rpath ${VIO_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../vio/${rpath})
ENDFOREACH(rpath)
-
-
FOREACH (ENGINE_LIB ${MYSQLD_STATIC_ENGINE_LIBS})
+ INCLUDE(${CMAKE_SOURCE_DIR}/storage/${plugin_dir_${ENGINE_LIB}}/CMakeLists.txt)
STRING(TOUPPER ${ENGINE_LIB} ENGINE_LIB_UPPER)
SET(ENGINE_DIR ${${ENGINE_LIB_UPPER}_DIR})
INCLUDE(${CMAKE_SOURCE_DIR}/storage/${ENGINE_DIR}/CMakeLists.txt)
@@ -98,7 +97,6 @@ FOREACH (ENGINE_LIB ${MYSQLD_STATIC_ENGINE_LIBS})
ENDFOREACH(rpath)
ENDFOREACH(ENGINE_LIB)
-
SET(SOURCE_SUBLIBS FALSE)
SET(LIBMYSQLD_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
@@ -116,6 +114,7 @@ SET(LIBMYSQLD_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
../sql/item_xmlfunc.cc ../sql/key.cc ../sql/lock.cc ../sql/log.cc
../sql/log_event.cc ../sql/mf_iocache.cc ../sql/my_decimal.cc
../sql/net_serv.cc ../sql/opt_range.cc ../sql/opt_sum.cc
+ ../sql/opt_table_elimination.cc
../sql/parse_file.cc ../sql/procedure.cc ../sql/protocol.cc
../sql/records.cc ../sql/repl_failsafe.cc ../sql/rpl_filter.cc
../sql/rpl_record.cc
@@ -154,7 +153,7 @@ FILE(WRITE cmake_dummy.c " ")
# custom targets to "sql/CMakeLists.txt" and reference them here.
ADD_LIBRARY(mysqlserver STATIC ${LIBMYSQLD_SOURCES})
ADD_DEPENDENCIES(mysqlserver GenServerSource GenError)
-TARGET_LINK_LIBRARIES(mysqlserver)
+TARGET_LINK_LIBRARIES(mysqlserver psapi.lib)
# Add any additional libraries requested by engine(s)
FOREACH (ENGINE_LIB ${MYSQLD_STATIC_ENGINE_LIBS})
@@ -167,3 +166,7 @@ ENDFOREACH(ENGINE_LIB)
ADD_LIBRARY(libmysqld SHARED cmake_dummy.c libmysqld.def)
ADD_DEPENDENCIES(libmysqld mysqlserver)
TARGET_LINK_LIBRARIES(libmysqld mysqlserver wsock32)
+
+INSTALL(TARGETS mysqlserver DESTINATION Embedded/static COMPONENT embedded)
+
+INSTALL(TARGETS libmysqld DESTINATION Embedded/DLL COMPONENT embedded)
diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am
index 16c45816bbf..83af96c7b89 100644
--- a/libmysqld/Makefile.am
+++ b/libmysqld/Makefile.am
@@ -77,7 +77,7 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
debug_sync.cc \
sql_tablespace.cc \
rpl_injector.cc my_user.c partition_info.cc \
- sql_servers.cc event_parse_data.cc
+ sql_servers.cc event_parse_data.cc opt_table_elimination.cc
libmysqld_int_a_SOURCES= $(libmysqld_sources)
nodist_libmysqld_int_a_SOURCES= $(libmysqlsources) $(sqlsources)
@@ -99,6 +99,7 @@ INC_LIB= $(top_builddir)/regex/libregex.a \
$(top_builddir)/vio/libvio.a \
@NDB_SCI_LIBS@ \
@mysql_plugin_libs@ \
+ $(libevent_inc_libs) \
$(yassl_inc_libs)
if HAVE_YASSL
@@ -124,7 +125,7 @@ handler.o: handler.cc
# found to append fileslists that collected by configure
# to the sources list
-ha_federated.o:ha_federated.cc
+ha_federatedx.o:ha_federatedx.cc
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
ha_heap.o:ha_heap.cc
@@ -231,6 +232,3 @@ link_sources:
clean-local:
rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlstoragesources) $(storagesources) | sed "s;\.lo;.c;g"`; \
rm -f client_settings.h
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 778d4874ad4..7de1ecd6ef3 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -1145,6 +1145,7 @@ bool Protocol_text::store_null()
return false;
}
+
bool Protocol::net_store_data(const uchar *from, size_t length)
{
char *field_buf;
@@ -1164,6 +1165,30 @@ bool Protocol::net_store_data(const uchar *from, size_t length)
return FALSE;
}
+
+bool Protocol::net_store_data(const uchar *from, size_t length,
+ CHARSET_INFO *from_cs, CHARSET_INFO *to_cs)
+{
+ uint conv_length= to_cs->mbmaxlen * length / from_cs->mbminlen;
+ uint dummy_error;
+ char *field_buf;
+ if (!thd->mysql) // bootstrap file handling
+ return false;
+
+ if (!(field_buf= (char*) alloc_root(alloc, conv_length + sizeof(uint) + 1)))
+ return true;
+ *next_field= field_buf + sizeof(uint);
+ length= copy_and_convert(*next_field, conv_length, to_cs,
+ (const char*) from, length, from_cs, &dummy_error);
+ *(uint *) field_buf= length;
+ (*next_field)[length]= 0;
+ if (next_mysql_field->max_length < length)
+ next_mysql_field->max_length= length;
+ ++next_field;
+ ++next_mysql_field;
+ return false;
+}
+
#if defined(_MSC_VER) && _MSC_VER < 1400
#define vsnprintf _vsnprintf
#endif
diff --git a/libmysqld/libmysqld.def b/libmysqld/libmysqld.def
index 047cfe0fe57..754aa6b3c29 100644
--- a/libmysqld/libmysqld.def
+++ b/libmysqld/libmysqld.def
@@ -108,3 +108,4 @@ EXPORTS
mysql_stmt_attr_get
mysql_stmt_attr_set
mysql_stmt_field_count
+ mysql_get_server_name