diff options
author | Daniel Fischer <df@sun.com> | 2010-04-21 14:58:09 +0200 |
---|---|---|
committer | Daniel Fischer <df@sun.com> | 2010-04-21 14:58:09 +0200 |
commit | 50edf454b14a5094603688b4eaf1c50ed280ba90 (patch) | |
tree | 4fad82e285f056995b626f0a62b5fa0488294c19 /libmysqld | |
parent | 7fcf60b80e66b6a7c037d89e3b266b7a9d68bc48 (diff) | |
parent | c6c992e1cb817401f5a09fd7f6cf4eaebf448fab (diff) | |
download | mariadb-git-50edf454b14a5094603688b4eaf1c50ed280ba90.tar.gz |
Merge
Diffstat (limited to 'libmysqld')
-rw-r--r-- | libmysqld/CMakeLists.txt | 13 | ||||
-rw-r--r-- | libmysqld/Makefile.am | 7 | ||||
-rw-r--r-- | libmysqld/examples/CMakeLists.txt | 10 | ||||
-rw-r--r-- | libmysqld/lib_sql.cc | 5 |
4 files changed, 22 insertions, 13 deletions
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt index b02510bda46..6c58429e065 100644 --- a/libmysqld/CMakeLists.txt +++ b/libmysqld/CMakeLists.txt @@ -81,9 +81,10 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc ../sql/scheduler.cc ../sql/sql_audit.cc ../sql/event_parse_data.cc ../sql/sql_signal.cc ../sql/rpl_handler.cc - ../sql/rpl_utility.cc + ../sql/rpl_utility.cc ../sql/sys_vars.cc ${CMAKE_BINARY_DIR}/sql/sql_builtin.cc + ../sql/mdl.cc ../sql/transaction.cc ${GEN_SOURCES} ${MYSYS_LIBWRAP_SOURCE} ) @@ -125,6 +126,16 @@ ENDFOREACH() MERGE_LIBRARIES(mysqlserver STATIC ${EMBEDDED_LIBS} OUTPUT_NAME ${MYSQLSERVER_OUTPUT_NAME} COMPONENT Embedded) +# Visual Studio users need debug static library +IF(MSVC) + INSTALL_DEBUG_TARGET(mysqlserver DESTINATION ${INSTALL_LIBDIR}/debug) +ENDIF() + +IF(UNIX) + INSTALL_DEBUG_TARGET(mysqlserver DESTINATION ${INSTALL_LIBDIR} RENAME + ${CMAKE_STATIC_LIBRARY_PREFIX}mysqld-debug) +ENDIF() + IF(MSVC AND NOT DISABLE_SHARED) MERGE_LIBRARIES(libmysqld SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS} COMPONENT Embedded) diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am index 2e3b935cafa..380dfb1396c 100644 --- a/libmysqld/Makefile.am +++ b/libmysqld/Makefile.am @@ -75,11 +75,10 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \ sp_head.cc sp_pcontext.cc sp.cc sp_cache.cc sp_rcontext.cc \ parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \ rpl_filter.cc sql_partition.cc sql_builtin.cc sql_plugin.cc \ - debug_sync.cc \ - sql_tablespace.cc \ + debug_sync.cc sql_tablespace.cc transaction.cc \ rpl_injector.cc my_user.c partition_info.cc \ - sql_servers.cc sql_audit.cc event_parse_data.cc \ - sql_signal.cc rpl_handler.cc keycaches.cc + sql_servers.cc event_parse_data.cc sql_signal.cc \ + rpl_handler.cc mdl.cc keycaches.cc sql_audit.cc libmysqld_int_a_SOURCES= $(libmysqld_sources) nodist_libmysqld_int_a_SOURCES= $(libmysqlsources) $(sqlsources) diff --git a/libmysqld/examples/CMakeLists.txt b/libmysqld/examples/CMakeLists.txt index ed0e5a361a8..f8adae9c931 100644 --- a/libmysqld/examples/CMakeLists.txt +++ b/libmysqld/examples/CMakeLists.txt @@ -23,7 +23,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ADD_DEFINITIONS(-DEMBEDDED_LIBRARY -UMYSQL_CLIENT) -ADD_EXECUTABLE(mysql_embedded ../../client/completion_hash.cc +MYSQL_ADD_EXECUTABLE(mysql_embedded ../../client/completion_hash.cc ../../client/mysql.cc ../../client/readline.cc) TARGET_LINK_LIBRARIES(mysql_embedded mysqlserver) IF(UNIX) @@ -31,7 +31,7 @@ IF(UNIX) TARGET_LINK_LIBRARIES(mysql_embedded ${READLINE_LIBRARY}) ENDIF(UNIX) -ADD_EXECUTABLE(mysqltest_embedded ../../client/mysqltest.cc) +MYSQL_ADD_EXECUTABLE(mysqltest_embedded ../../client/mysqltest.cc) TARGET_LINK_LIBRARIES(mysqltest_embedded mysqlserver) @@ -44,11 +44,11 @@ IF(CMAKE_GENERATOR MATCHES "Xcode") COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/mysql_client_test_embedded_dummy.cc ) - ADD_EXECUTABLE(mysql_client_test_embedded + MYSQL_ADD_EXECUTABLE(mysql_client_test_embedded ${CMAKE_CURRENT_BINARY_DIR}/mysql_client_test_embedded_dummy.cc ../../tests/mysql_client_test.c) ELSE() - ADD_EXECUTABLE(mysql_client_test_embedded ../../tests/mysql_client_test.c) + MYSQL_ADD_EXECUTABLE(mysql_client_test_embedded ../../tests/mysql_client_test.c) SET_TARGET_PROPERTIES(mysql_client_test_embedded PROPERTIES HAS_CXX TRUE) ENDIF() TARGET_LINK_LIBRARIES(mysql_client_test_embedded mysqlserver) @@ -58,5 +58,3 @@ SET_TARGET_PROPERTIES(mysql_embedded PROPERTIES ENABLE_EXPORTS TRUE) SET_TARGET_PROPERTIES(mysqltest_embedded PROPERTIES ENABLE_EXPORTS TRUE) SET_TARGET_PROPERTIES(mysql_client_test_embedded PROPERTIES ENABLE_EXPORTS TRUE) ENDIF() - -INSTALL(TARGETS mysql_embedded mysqltest_embedded mysql_client_test_embedded DESTINATION bin) diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index c1c5ce3ec97..256c1e8fd40 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -118,6 +118,7 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command, net_clear_error(net); thd->current_stmt= stmt; + thd->thread_stack= (char*) &thd; thd->store_globals(); // Fix if more than one connect /* We have to call free_old_query before we start to fill mysql->fields @@ -936,10 +937,10 @@ bool Protocol::send_result_set_metadata(List<Item> *list, uint flags) strlen(server_field.org_table_name), cs, thd_cs); client_field->org_name= dup_str_aux(field_alloc, server_field.org_col_name, strlen(server_field.org_col_name), cs, thd_cs); - if (item->collation.collation == &my_charset_bin || thd_cs == NULL) + if (item->charset_for_protocol() == &my_charset_bin || thd_cs == NULL) { /* No conversion */ - client_field->charsetnr= server_field.charsetnr; + client_field->charsetnr= item->charset_for_protocol()->number; client_field->length= server_field.length; } else |