diff --git a/include/my_global.h b/include/my_global.h index d6cfea85..4df7691a 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -535,10 +535,12 @@ extern double my_atof(const char*); #if SIZEOF_LONG == 4 #define INT_MIN32 (long) 0x80000000L #define INT_MAX32 (long) 0x7FFFFFFFL +#define UINT_MAX32 0xFFFFFFFFL #define INT_MIN24 ((long) 0xff800000L) #define INT_MAX24 0x007fffffL #define INT_MIN16 ((short int) 0x8000) #define INT_MAX16 0x7FFF +#define UINT_MAX16 0xFFFF #define INT_MIN8 ((char) 0x80) #define INT_MAX8 ((char) 0x7F) #else /* Probably Alpha */ @@ -550,6 +552,14 @@ extern double my_atof(const char*); #define INT_MAX16 ((short int) 0x00007FFF) #endif +#ifndef ULL +#ifdef HAVE_LONG_LONG +#define ULL(A) A ## ULL +#else +#define ULL(A) A ## UL +#endif +#endif + /* From limits.h instead */ #ifndef DBL_MIN #define DBL_MIN 4.94065645841246544e-324 diff --git a/include/mysql.h b/include/mysql.h index b6fd79ca..8f5a7e0f 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -268,6 +268,10 @@ typedef struct st_mysql { void *extension; } MYSQL; +typedef struct st_mysql_lex_string { + char *str; + size_t length; +} MYSQL_LEX_STRING; struct st_mysql_options_extention { char *plugin_dir; diff --git a/include/mysql/client_plugin.h b/include/mysql/client_plugin.h index 399a4bb4..572f2df4 100644 --- a/include/mysql/client_plugin.h +++ b/include/mysql/client_plugin.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010, 2011 Sergei Golubchik and Monty Program Ab +/* Copyright (C) 2010 - 2012 Sergei Golubchik and Monty Program Ab This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public diff --git a/include/mysql_com.h b/include/mysql_com.h index dfbb1cb7..93f127fa 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -1,5 +1,5 @@ /************************************************************************************ - Copyright (C) 2000, 2011 MySQL AB & MySQL Finland AB & TCX DataKonsult AB, + Copyright (C) 2000, 2012 MySQL AB & MySQL Finland AB & TCX DataKonsult AB, Monty Program AB This library is free software; you can redistribute it and/or diff --git a/include/sha1.h b/include/sha1.h index 79743af5..6113d791 100644 --- a/include/sha1.h +++ b/include/sha1.h @@ -1,5 +1,5 @@ /**************************************************************************** - Copyright (C) 2011 Monty Program AB + Copyright (C) 2012 Monty Program AB This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt index eb3a475f..0a5de5ff 100644 --- a/libmysql/CMakeLists.txt +++ b/libmysql/CMakeLists.txt @@ -30,13 +30,19 @@ SET(LIBMYSQL_SOURCES array.c bchange.c bmove.c bmove_upp.c my_charset.c my_loaddata.c my_stmt_codec.c client_plugin.c my_auth.c my_secure.c) ADD_LIBRARY(mysqlclient STATIC ${LIBMYSQL_SOURCES}) -TARGET_LINK_LIBRARIES(mysqlclient ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} ${OPENSSL_LIBRARIES} zlib) +TARGET_LINK_LIBRARIES(mysqlclient ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} zlib) +IF(OPENSSL_LIBRARIES) + TARGET_LINK_LIBRARIES(mysqlclient ${OPENSSL_LIBRARIES} zlib) +ENDIF(OPENSSL_LIBRARIES) IF(UNIX) TARGET_LINK_LIBRARIES(mysqlclient m) ENDIF(UNIX) ADD_LIBRARY(libmysql SHARED ${LIBMYSQL_SOURCES}) -TARGET_LINK_LIBRARIES(libmysql ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} ${OPENSSL_LIBRARIES} zlib) +TARGET_LINK_LIBRARIES(libmysql ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} zlib) +IF(OPENSSL_LIBRARIES) + TARGET_LINK_LIBRARIES(libmysql ${OPENSSL_LIBRARIES}) +ENDIF(OPENSSL_LIBRARIES) IF(WIN32) TARGET_LINK_LIBRARIES(libmysql ws2_32) diff --git a/libmysql/client_plugin.c b/libmysql/client_plugin.c index 26a04705..6031c319 100644 --- a/libmysql/client_plugin.c +++ b/libmysql/client_plugin.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010, 2011 Sergei Golubchik and Monty Program Ab +/* Copyright (C) 2010 - 2012 Sergei Golubchik and Monty Program Ab This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 397747ba..cda58b1d 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -1950,7 +1950,7 @@ static void mysql_close_memory(MYSQL *mysql) my_free(mysql->passwd,MYF(MY_ALLOW_ZERO_PTR)); my_free(mysql->db,MYF(MY_ALLOW_ZERO_PTR)); my_free(mysql->server_version,MYF(MY_ALLOW_ZERO_PTR)); - mysql->server_version=mysql->user=mysql->passwd=mysql->db=0; + mysql->host_info= mysql->server_version=mysql->user=mysql->passwd=mysql->db=0; mysql_close_options(mysql); } diff --git a/libmysql/my_charset.c b/libmysql/my_charset.c index 12e05963..f0ac7759 100644 --- a/libmysql/my_charset.c +++ b/libmysql/my_charset.c @@ -1,5 +1,5 @@ /**************************************************************************** - Copyright (C) 2011 Monty Program AB + Copyright (C) 2012 Monty Program AB This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public diff --git a/libmysql/my_stmt.c b/libmysql/my_stmt.c index 0b27f3e9..ab2a5249 100644 --- a/libmysql/my_stmt.c +++ b/libmysql/my_stmt.c @@ -1,5 +1,5 @@ /**************************************************************************** - Copyright (C) 2011 Monty Program AB + Copyright (C) 2012 Monty Program AB This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public diff --git a/libmysql/my_stmt_codec.c b/libmysql/my_stmt_codec.c index 93304aff..ff8badb0 100644 --- a/libmysql/my_stmt_codec.c +++ b/libmysql/my_stmt_codec.c @@ -1,5 +1,5 @@ /**************************************************************************** - Copyright (C) 2011 Monty Program AB + Copyright (C) 2012 Monty Program AB This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public diff --git a/libmysql/sha1.c b/libmysql/sha1.c index 4966d465..b1c231af 100644 --- a/libmysql/sha1.c +++ b/libmysql/sha1.c @@ -1,5 +1,5 @@ /**************************************************************************** - Copyright (C) 2011 Monty Program AB + Copyright (C) 2012 Monty Program AB This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public diff --git a/mysql_config/CMakeLists.txt b/mysql_config/CMakeLists.txt index 60a1c43b..10e7c8e1 100644 --- a/mysql_config/CMakeLists.txt +++ b/mysql_config/CMakeLists.txt @@ -10,6 +10,9 @@ FOREACH (dep ${libmysql_LIB_DEPENDS}) ENDFOREACH(dep) IF(UNIX) + IF(OPENSSL_LIBRARIES) + SET(extra_dynamic_LDFLAGS "${extra_dynamic_LDFLAGS} -lssl") + ENDIF(OPENSSL_LIBRARIES) IF(DL_LIBRARY) SET(extra_dynamic_LDFLAGS "${extra_dynamic_LDFLAGS} -ldl") ENDIF(DL_LIBRARY)