You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-07 02:42:49 +03:00
Fixed crash when trying to call mysql_close twice
Fixed mysql_config Header changes
This commit is contained in:
@@ -535,10 +535,12 @@ extern double my_atof(const char*);
|
|||||||
#if SIZEOF_LONG == 4
|
#if SIZEOF_LONG == 4
|
||||||
#define INT_MIN32 (long) 0x80000000L
|
#define INT_MIN32 (long) 0x80000000L
|
||||||
#define INT_MAX32 (long) 0x7FFFFFFFL
|
#define INT_MAX32 (long) 0x7FFFFFFFL
|
||||||
|
#define UINT_MAX32 0xFFFFFFFFL
|
||||||
#define INT_MIN24 ((long) 0xff800000L)
|
#define INT_MIN24 ((long) 0xff800000L)
|
||||||
#define INT_MAX24 0x007fffffL
|
#define INT_MAX24 0x007fffffL
|
||||||
#define INT_MIN16 ((short int) 0x8000)
|
#define INT_MIN16 ((short int) 0x8000)
|
||||||
#define INT_MAX16 0x7FFF
|
#define INT_MAX16 0x7FFF
|
||||||
|
#define UINT_MAX16 0xFFFF
|
||||||
#define INT_MIN8 ((char) 0x80)
|
#define INT_MIN8 ((char) 0x80)
|
||||||
#define INT_MAX8 ((char) 0x7F)
|
#define INT_MAX8 ((char) 0x7F)
|
||||||
#else /* Probably Alpha */
|
#else /* Probably Alpha */
|
||||||
@@ -550,6 +552,14 @@ extern double my_atof(const char*);
|
|||||||
#define INT_MAX16 ((short int) 0x00007FFF)
|
#define INT_MAX16 ((short int) 0x00007FFF)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef ULL
|
||||||
|
#ifdef HAVE_LONG_LONG
|
||||||
|
#define ULL(A) A ## ULL
|
||||||
|
#else
|
||||||
|
#define ULL(A) A ## UL
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* From limits.h instead */
|
/* From limits.h instead */
|
||||||
#ifndef DBL_MIN
|
#ifndef DBL_MIN
|
||||||
#define DBL_MIN 4.94065645841246544e-324
|
#define DBL_MIN 4.94065645841246544e-324
|
||||||
|
@@ -268,6 +268,10 @@ typedef struct st_mysql {
|
|||||||
void *extension;
|
void *extension;
|
||||||
} MYSQL;
|
} MYSQL;
|
||||||
|
|
||||||
|
typedef struct st_mysql_lex_string {
|
||||||
|
char *str;
|
||||||
|
size_t length;
|
||||||
|
} MYSQL_LEX_STRING;
|
||||||
|
|
||||||
struct st_mysql_options_extention {
|
struct st_mysql_options_extention {
|
||||||
char *plugin_dir;
|
char *plugin_dir;
|
||||||
|
@@ -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
|
This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public
|
modify it under the terms of the GNU Library General Public
|
||||||
|
@@ -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
|
Monty Program AB
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
This library is free software; you can redistribute it and/or
|
||||||
|
@@ -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
|
This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public
|
modify it under the terms of the GNU Library General Public
|
||||||
|
@@ -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)
|
my_loaddata.c my_stmt_codec.c client_plugin.c my_auth.c my_secure.c)
|
||||||
|
|
||||||
ADD_LIBRARY(mysqlclient STATIC ${LIBMYSQL_SOURCES})
|
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)
|
IF(UNIX)
|
||||||
TARGET_LINK_LIBRARIES(mysqlclient m)
|
TARGET_LINK_LIBRARIES(mysqlclient m)
|
||||||
ENDIF(UNIX)
|
ENDIF(UNIX)
|
||||||
|
|
||||||
ADD_LIBRARY(libmysql SHARED ${LIBMYSQL_SOURCES})
|
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)
|
IF(WIN32)
|
||||||
TARGET_LINK_LIBRARIES(libmysql ws2_32)
|
TARGET_LINK_LIBRARIES(libmysql ws2_32)
|
||||||
|
@@ -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
|
This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public
|
modify it under the terms of the GNU Library General Public
|
||||||
|
@@ -1950,7 +1950,7 @@ static void mysql_close_memory(MYSQL *mysql)
|
|||||||
my_free(mysql->passwd,MYF(MY_ALLOW_ZERO_PTR));
|
my_free(mysql->passwd,MYF(MY_ALLOW_ZERO_PTR));
|
||||||
my_free(mysql->db,MYF(MY_ALLOW_ZERO_PTR));
|
my_free(mysql->db,MYF(MY_ALLOW_ZERO_PTR));
|
||||||
my_free(mysql->server_version,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);
|
mysql_close_options(mysql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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
|
This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public
|
modify it under the terms of the GNU Library General Public
|
||||||
|
@@ -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
|
This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public
|
modify it under the terms of the GNU Library General Public
|
||||||
|
@@ -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
|
This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public
|
modify it under the terms of the GNU Library General Public
|
||||||
|
@@ -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
|
This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public
|
modify it under the terms of the GNU Library General Public
|
||||||
|
@@ -10,6 +10,9 @@ FOREACH (dep ${libmysql_LIB_DEPENDS})
|
|||||||
ENDFOREACH(dep)
|
ENDFOREACH(dep)
|
||||||
|
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
|
IF(OPENSSL_LIBRARIES)
|
||||||
|
SET(extra_dynamic_LDFLAGS "${extra_dynamic_LDFLAGS} -lssl")
|
||||||
|
ENDIF(OPENSSL_LIBRARIES)
|
||||||
IF(DL_LIBRARY)
|
IF(DL_LIBRARY)
|
||||||
SET(extra_dynamic_LDFLAGS "${extra_dynamic_LDFLAGS} -ldl")
|
SET(extra_dynamic_LDFLAGS "${extra_dynamic_LDFLAGS} -ldl")
|
||||||
ENDIF(DL_LIBRARY)
|
ENDIF(DL_LIBRARY)
|
||||||
|
Reference in New Issue
Block a user