Loading CMakeLists.txt +4 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,10 @@ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DDBUG_OFF SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DDBUG_OFF") SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DDBUG_OFF") #TODO: update the code and remove the disabled warnings SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805") IF(CMAKE_GENERATOR MATCHES "Visual Studio 8") SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /wd4996") SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /wd4996") Loading client/mysqltest.c +25 −9 Original line number Diff line number Diff line Loading @@ -550,6 +550,17 @@ static int do_send_query(struct st_connection *cn, const char *q, int q_len, return 0; } static void wait_query_thread_end(struct st_connection *con) { if (!con->query_done) { pthread_mutex_lock(&con->mutex); while (!con->query_done) pthread_cond_wait(&con->cond, &con->mutex); pthread_mutex_unlock(&con->mutex); } } #else /*EMBEDDED_LIBRARY*/ #define do_send_query(cn,q,q_len,flags) mysql_send_query(&cn->mysql, q, q_len) Loading Loading @@ -4071,7 +4082,14 @@ void do_close_connection(struct st_command *command) con->mysql.net.vio = 0; } } #endif #else /* As query could be still executed in a separate theread we need to check if the query's thread was finished and probably wait (embedded-server specific) */ wait_query_thread_end(con); #endif /*EMBEDDED_LIBRARY*/ if (con->stmt) mysql_stmt_close(con->stmt); con->stmt= 0; Loading Loading @@ -4361,6 +4379,9 @@ void do_connect(struct st_command *command) (int) (sizeof(connections)/sizeof(struct st_connection))); } #ifdef EMBEDDED_LIBRARY con_slot->query_done= 1; #endif if (!mysql_init(&con_slot->mysql)) die("Failed on mysql_init()"); if (opt_compress || con_compress) Loading Loading @@ -5852,12 +5873,7 @@ void run_query_normal(struct st_connection *cn, struct st_command *command, query's thread was finished and probably wait */ else if (flags & QUERY_REAP_FLAG) { pthread_mutex_lock(&cn->mutex); while (!cn->query_done) pthread_cond_wait(&cn->cond, &cn->mutex); pthread_mutex_unlock(&cn->mutex); } wait_query_thread_end(cn); #endif /*EMBEDDED_LIBRARY*/ if (!(flags & QUERY_REAP_FLAG)) DBUG_VOID_RETURN; Loading include/config-win.h +1 −3 Original line number Diff line number Diff line Loading @@ -157,14 +157,12 @@ typedef uint rf_SetTimer; #define Socket_defined #define my_socket SOCKET #define bool BOOL #define SIGPIPE SIGINT #define RETQSORTTYPE void #define QSORT_TYPE_IS_VOID #define RETSIGTYPE void #define SOCKET_SIZE_TYPE int #define my_socket_defined #define bool_defined #define byte_defined #define HUGE_PTR #define STDCALL __stdcall /* Used by libmysql.dll */ Loading Loading @@ -403,4 +401,4 @@ inline double ulonglong2double(ulonglong value) #define HAVE_CHARSET_ujis 1 #define HAVE_CHARSET_utf8 1 #define HAVE_UCA_COLLATIONS 1 #define HAVE_BOOL 1 include/my_global.h +1 −1 Original line number Diff line number Diff line Loading @@ -980,7 +980,7 @@ typedef int myf; /* Type of MyFlags in my_funcs */ typedef char byte; /* Smallest addressable unit */ #endif typedef char my_bool; /* Small bool */ #if !defined(bool) && !defined(bool_defined) && (!defined(HAVE_BOOL) || !defined(__cplusplus)) #if !defined(bool) && (!defined(HAVE_BOOL) || !defined(__cplusplus)) typedef char bool; /* Ordinary boolean values 0 1 */ #endif /* Macros for converting *constants* to the right type */ Loading mysql-test/r/flush.result +1 −0 Original line number Diff line number Diff line Loading @@ -72,3 +72,4 @@ flush tables with read lock; unlock tables; drop table t1, t2; set session low_priority_updates=default; select benchmark(200, (select sin(1))) > 1000; Loading
CMakeLists.txt +4 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,10 @@ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DDBUG_OFF SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DDBUG_OFF") SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DDBUG_OFF") #TODO: update the code and remove the disabled warnings SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805") IF(CMAKE_GENERATOR MATCHES "Visual Studio 8") SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /wd4996") SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /wd4996") Loading
client/mysqltest.c +25 −9 Original line number Diff line number Diff line Loading @@ -550,6 +550,17 @@ static int do_send_query(struct st_connection *cn, const char *q, int q_len, return 0; } static void wait_query_thread_end(struct st_connection *con) { if (!con->query_done) { pthread_mutex_lock(&con->mutex); while (!con->query_done) pthread_cond_wait(&con->cond, &con->mutex); pthread_mutex_unlock(&con->mutex); } } #else /*EMBEDDED_LIBRARY*/ #define do_send_query(cn,q,q_len,flags) mysql_send_query(&cn->mysql, q, q_len) Loading Loading @@ -4071,7 +4082,14 @@ void do_close_connection(struct st_command *command) con->mysql.net.vio = 0; } } #endif #else /* As query could be still executed in a separate theread we need to check if the query's thread was finished and probably wait (embedded-server specific) */ wait_query_thread_end(con); #endif /*EMBEDDED_LIBRARY*/ if (con->stmt) mysql_stmt_close(con->stmt); con->stmt= 0; Loading Loading @@ -4361,6 +4379,9 @@ void do_connect(struct st_command *command) (int) (sizeof(connections)/sizeof(struct st_connection))); } #ifdef EMBEDDED_LIBRARY con_slot->query_done= 1; #endif if (!mysql_init(&con_slot->mysql)) die("Failed on mysql_init()"); if (opt_compress || con_compress) Loading Loading @@ -5852,12 +5873,7 @@ void run_query_normal(struct st_connection *cn, struct st_command *command, query's thread was finished and probably wait */ else if (flags & QUERY_REAP_FLAG) { pthread_mutex_lock(&cn->mutex); while (!cn->query_done) pthread_cond_wait(&cn->cond, &cn->mutex); pthread_mutex_unlock(&cn->mutex); } wait_query_thread_end(cn); #endif /*EMBEDDED_LIBRARY*/ if (!(flags & QUERY_REAP_FLAG)) DBUG_VOID_RETURN; Loading
include/config-win.h +1 −3 Original line number Diff line number Diff line Loading @@ -157,14 +157,12 @@ typedef uint rf_SetTimer; #define Socket_defined #define my_socket SOCKET #define bool BOOL #define SIGPIPE SIGINT #define RETQSORTTYPE void #define QSORT_TYPE_IS_VOID #define RETSIGTYPE void #define SOCKET_SIZE_TYPE int #define my_socket_defined #define bool_defined #define byte_defined #define HUGE_PTR #define STDCALL __stdcall /* Used by libmysql.dll */ Loading Loading @@ -403,4 +401,4 @@ inline double ulonglong2double(ulonglong value) #define HAVE_CHARSET_ujis 1 #define HAVE_CHARSET_utf8 1 #define HAVE_UCA_COLLATIONS 1 #define HAVE_BOOL 1
include/my_global.h +1 −1 Original line number Diff line number Diff line Loading @@ -980,7 +980,7 @@ typedef int myf; /* Type of MyFlags in my_funcs */ typedef char byte; /* Smallest addressable unit */ #endif typedef char my_bool; /* Small bool */ #if !defined(bool) && !defined(bool_defined) && (!defined(HAVE_BOOL) || !defined(__cplusplus)) #if !defined(bool) && (!defined(HAVE_BOOL) || !defined(__cplusplus)) typedef char bool; /* Ordinary boolean values 0 1 */ #endif /* Macros for converting *constants* to the right type */ Loading
mysql-test/r/flush.result +1 −0 Original line number Diff line number Diff line Loading @@ -72,3 +72,4 @@ flush tables with read lock; unlock tables; drop table t1, t2; set session low_priority_updates=default; select benchmark(200, (select sin(1))) > 1000;