Skip to content

Commit

Permalink
Disable dbug by default (to enable it specify cmake option -DWITH_DBU…
Browse files Browse the repository at this point in the history
…G=ON)

minor fixes for 10.2 integration (windows)
  • Loading branch information
9EOR9 committed Feb 5, 2016
1 parent 0c3c789 commit f3577ba
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "Relwithdebinfo")
ENDIF()

OPTION(WITH_DBUG "enables use of DBUG library" OFF)
IF(NOT WITH_DBUG)
ADD_DEFINITIONS(-DDBUG_OFF=1)
ENDIF()

# various defines for generating include/mysql_version.h

SET(PROTOCOL_VERSION 10) # we adapted new password option from PHP's mysqlnd !
Expand Down
4 changes: 3 additions & 1 deletion libmariadb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ hash.c
net.c
charset.c
ma_time.c
dbug.c
default.c
errmsg.c
errors.c
Expand Down Expand Up @@ -322,6 +321,9 @@ ${CMAKE_BINARY_DIR}/libmariadb/client_plugin.c
ma_io.c
${SSL_SOURCES}
)
IF(WITH_DBUG)
SET(LIBMARIADB_SOURCES ${LIBMARIADB_SOURCES} dbug.c)
ENDIF()


IF(WIN32)
Expand Down
7 changes: 2 additions & 5 deletions libmariadb/libmariadb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1412,11 +1412,8 @@ MYSQL *mthd_my_real_connect(MYSQL *mysql, const char *host, const char *user,
#endif
#else
/* named pipe */
if ((unix_socket ||
(!host && is_NT()) ||
(host && strcmp(host,LOCAL_HOST_NAMEDPIPE) == 0) ||
mysql->options.named_pipe) &&
mysql->options.protocol != MYSQL_PROTOCOL_TCP)
if (mysql->options.protocol == MYSQL_PROTOCOL_PIPE ||
(host && strcmp(host,LOCAL_HOST_NAMEDPIPE) == 0))
{
cinfo.type= PVIO_TYPE_NAMEDPIPE;
sprintf(host_info=buff,ER(CR_NAMEDPIPE_CONNECTION),cinfo.host);
Expand Down
8 changes: 4 additions & 4 deletions libmariadb/secure/schannel.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,14 @@ int ma_ssl_start(char *errmsg, size_t errmsg_len)
*/
void ma_ssl_end()
{
pthread_mutex_lock(&LOCK_schannel_config);
if (ma_ssl_initialized)
{

pthread_mutex_lock(&LOCK_schannel_config);
ma_ssl_initialized= FALSE;
pthread_mutex_unlock(&LOCK_schannel_config);
pthread_mutex_destroy(&LOCK_schannel_config);
}
pthread_mutex_unlock(&LOCK_schannel_config);
pthread_mutex_destroy(&LOCK_schannel_config);

return;
}

Expand Down

0 comments on commit f3577ba

Please sign in to comment.