From: Tor Didriksen Date: October 30 2012 1:54pm Subject: bzr push into mysql-trunk branch (tor.didriksen:4857 to 4858) List-Archive: http://lists.mysql.com/commits/145298 Message-Id: <20121030135418.11165.61514.4858@atum07.no.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 4858 Tor Didriksen 2012-10-30 [merge] merge 5.6 => trunk modified: configure.cmake extra/yassl/src/buffer.cpp extra/yassl/src/yassl_int.cpp unittest/gunit/yassl/CMakeLists.txt unittest/gunit/yassl/yassl-t.cc 4857 Anirudh Mangipudi 2012-10-30 [merge] BUG#11754894: MYISAMCHK ERROR HAS INCORRECT REFERENCE TO 'MYISAM_SORT_BUFFER_SIZE' Merging from 5.6 to trunk modified: storage/myisam/myisamchk.c === modified file 'configure.cmake' --- a/configure.cmake 2012-05-15 09:39:47 +0000 +++ b/configure.cmake 2012-10-30 13:49:44 +0000 @@ -325,13 +325,14 @@ ENDIF() # Figure out threading library # FIND_PACKAGE (Threads) +# Defines CMAKE_USE_PTHREADS_INIT and CMAKE_THREAD_LIBS_INIT. +INCLUDE(FindThreads) FUNCTION(MY_CHECK_PTHREAD_ONCE_INIT) CHECK_C_COMPILER_FLAG("-Werror" HAVE_WERROR_FLAG) - IF(NOT HAVE_WERROR_FLAG) - RETURN() + IF(HAVE_WERROR_FLAG) + SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror") ENDIF() - SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror") CHECK_C_SOURCE_COMPILES(" #include void foo(void) {} === modified file 'extra/yassl/src/buffer.cpp' --- a/extra/yassl/src/buffer.cpp 2012-07-24 13:24:00 +0000 +++ b/extra/yassl/src/buffer.cpp 2012-10-30 13:49:44 +0000 @@ -23,6 +23,8 @@ */ +// First include (the generated) my_config.h, to get correct platform defines. +#include "my_config.h" #include // memcpy #include "runtime.hpp" #include "buffer.hpp" === modified file 'extra/yassl/src/yassl_int.cpp' --- a/extra/yassl/src/yassl_int.cpp 2012-10-30 06:44:19 +0000 +++ b/extra/yassl/src/yassl_int.cpp 2012-10-30 13:51:37 +0000 @@ -17,18 +17,19 @@ * draft along with type conversion functions. */ +// First include (the generated) my_config.h, to get correct platform defines. +#include "my_config.h" +#ifdef __WIN__ +#include +#else +#include +#endif + #include "runtime.hpp" #include "yassl_int.hpp" #include "handshake.hpp" #include "timer.hpp" -#ifdef _POSIX_THREADS - #include "pthread.h" -#endif - -#ifdef __WIN__ - #include -#endif #ifdef HAVE_LIBZ #include "zlib.h" #endif @@ -1627,10 +1628,15 @@ void Session_initialize() sessionsInstance = NEW_YS Sessions; } +extern "C" +{ + static void c_session_initialize() { Session_initialize(); } +} + Sessions& GetSessions() { - yassl_pthread_once(&session_created, Session_initialize); + yassl_pthread_once(&session_created, c_session_initialize); return *sessionsInstance; } @@ -1886,6 +1892,8 @@ extern "C" char *yassl_mysql_strdup(cons } +extern "C" +{ static int default_password_callback(char * buffer, int size_arg, int rwflag, void * /* unused: callback_data */) @@ -1914,7 +1922,7 @@ default_password_callback(char * buffer, free(passwd); return passwd_len; } - +} SSL_CTX::SSL_CTX(SSL_METHOD* meth) : method_(meth), certificate_(0), privateKey_(0), @@ -2689,7 +2697,6 @@ extern "C" void yaSSL_CleanUp() yaSSL::ysDelete(yaSSL::sslFactoryInstance); yaSSL::ysDelete(yaSSL::sessionsInstance); yaSSL::ysDelete(yaSSL::errorsInstance); - yaSSL::session_created= YASSL_PTHREAD_ONCE_INIT; // In case user calls more than once, prevent seg fault yaSSL::sslFactoryInstance = 0; === modified file 'unittest/gunit/yassl/CMakeLists.txt' --- a/unittest/gunit/yassl/CMakeLists.txt 2012-10-30 06:44:19 +0000 +++ b/unittest/gunit/yassl/CMakeLists.txt 2012-10-30 13:51:37 +0000 @@ -14,6 +14,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA INCLUDE_DIRECTORIES( + ${GTEST_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/unittest/gunit ${CMAKE_SOURCE_DIR}/extra/yassl/include @@ -29,3 +30,4 @@ SET(CMAKE_CXX_FLAGS ${nowerr_flags}) ADD_EXECUTABLE(yassl-t yassl-t.cc) TARGET_LINK_LIBRARIES(yassl-t gunit_small sqlgunitlib strings dbug regex) +TARGET_LINK_LIBRARIES(yassl-t ${LIBSOCKET}) === modified file 'unittest/gunit/yassl/yassl-t.cc' --- a/unittest/gunit/yassl/yassl-t.cc 2012-10-30 06:44:19 +0000 +++ b/unittest/gunit/yassl/yassl-t.cc 2012-10-30 13:51:37 +0000 @@ -17,6 +17,12 @@ #include "my_config.h" #include +#ifdef __WIN__ +#include +#else +#include +#endif + #include "runtime.hpp" #include "yassl_int.hpp" No bundle (reason: useless for push emails).