changeset 184:e8c3c92f2532

upgade to mariadb-connector-c 3.1.11
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 16 Dec 2020 09:47:14 +0100
parents 2f94b2046d7c
children 7c46155b5bb4
files MySQL/NEWS Resources/CMake/MariaDBConfiguration.cmake Resources/MariaDB/mariadb-connector-c-3.1.11.patch
diffstat 3 files changed, 39 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/MySQL/NEWS	Tue Dec 15 10:04:35 2020 +0100
+++ b/MySQL/NEWS	Wed Dec 16 09:47:14 2020 +0100
@@ -15,6 +15,7 @@
     Orthanc configuration)
 * Upgraded dependencies for static builds (notably on Windows and LSB):
   - openssl 1.1.1g
+  - mariadb-connector-c 3.1.11
 
 
 Release 2.0 (2019-01-23)
--- a/Resources/CMake/MariaDBConfiguration.cmake	Tue Dec 15 10:04:35 2020 +0100
+++ b/Resources/CMake/MariaDBConfiguration.cmake	Wed Dec 16 09:47:14 2020 +0100
@@ -19,11 +19,11 @@
 
 if (STATIC_BUILD OR NOT USE_SYSTEM_MYSQL_CLIENT)
   set(MARIADB_CLIENT_VERSION_MAJOR "10")
-  set(MARIADB_CLIENT_VERSION_MINOR "3")
-  set(MARIADB_CLIENT_VERSION_PATCH "6")
-  set(MARIADB_PACKAGE_VERSION "3.0.5")
+  set(MARIADB_CLIENT_VERSION_MINOR "5")
+  set(MARIADB_CLIENT_VERSION_PATCH "5")
+  set(MARIADB_PACKAGE_VERSION "3.1.11")
   set(MARIADB_CLIENT_SOURCES_DIR ${CMAKE_BINARY_DIR}/mariadb-connector-c-${MARIADB_PACKAGE_VERSION}-src)
-  set(MARIADB_CLIENT_MD5 "b846584b8b7a39c51a6e83986b57c71c")
+  set(MARIADB_CLIENT_MD5 "cf9da5f0ac9ec72dd8309bdc1d1c6c2f")
   set(MARIADB_CLIENT_URL "http://orthanc.osimis.io/ThirdPartyDownloads/mariadb-connector-c-${MARIADB_PACKAGE_VERSION}-src.tar.gz")
 
   if (IS_DIRECTORY "${MARIADB_CLIENT_SOURCES_DIR}")
@@ -37,7 +37,7 @@
   if (FirstRun)
     execute_process(
       COMMAND ${PATCH_EXECUTABLE} -p0 -N -i
-      ${CMAKE_CURRENT_LIST_DIR}/../MariaDB/mariadb-connector-c-3.0.5.patch
+      ${CMAKE_CURRENT_LIST_DIR}/../MariaDB/mariadb-connector-c-${MARIADB_PACKAGE_VERSION}.patch
       WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
       RESULT_VARIABLE Failure
       )
@@ -52,17 +52,18 @@
   include(${MARIADB_CLIENT_SOURCES_DIR}/cmake/CheckFunctions.cmake)
   include(${MARIADB_CLIENT_SOURCES_DIR}/cmake/CheckTypes.cmake)
 
-  set(MARIADB_CLIENT_VERSION "${MARIADB_CLIENT_VERSION_MAJOR}.${MARIADB_CLIENT_VERSION_MINOR}.${MARIADB_CLIENT_VERSION_PATCH}")
+  set(MARIADB_CLIENT_VERSION "${MARIADB_CLIENT_VERSION_MAJOR}.${MARIADB_CLIENT_VERSION_MINOR}")
   set(MARIADB_BASE_VERSION "mariadb-${MARIADB_CLIENT_VERSION_MAJOR}.${MARIADB_CLIENT_VERSION_MINOR}")
   math(EXPR MARIADB_VERSION_ID "${MARIADB_CLIENT_VERSION_MAJOR} * 10000 +
                               ${MARIADB_CLIENT_VERSION_MINOR} * 100   +
                               ${MARIADB_CLIENT_VERSION_PATCH}")
-
-  set(HAVE_DLOPEN 1)
+                            
+  #set(HAVE_DLOPEN 1)  # Not needed anymore in 3.1.11
   set(PROTOCOL_VERSION ${MARIADB_CLIENT_VERSION_MAJOR})
   set(MARIADB_PORT 3306)
   set(MARIADB_UNIX_ADDR "/var/run/mysqld/mysqld.sock")
   set(DEFAULT_CHARSET "latin1")
+  set(ENABLED_LOCAL_INFILE "AUTO")
 
   FOREACH(plugin mysql_native_password mysql_old_password pvio_socket)
     set(EXTERNAL_PLUGINS "${EXTERNAL_PLUGINS} extern struct st_mysql_client_plugin ${plugin}_client_plugin;\n")
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Resources/MariaDB/mariadb-connector-c-3.1.11.patch	Wed Dec 16 09:47:14 2020 +0100
@@ -0,0 +1,29 @@
+diff -urEb mariadb-connector-c-3.1.11-src.orig/include/ma_global.h mariadb-connector-c-3.1.11-src/include/ma_global.h
+--- mariadb-connector-c-3.1.11-src.orig/include/ma_global.h	2020-12-15 12:42:41.791904385 +0100
++++ mariadb-connector-c-3.1.11-src/include/ma_global.h	2020-12-16 09:28:04.237789973 +0100
+@@ -606,7 +606,9 @@
+ #error "Neither int or long is of 4 bytes width"
+ #endif
+ 
+-#if !defined(HAVE_ULONG) && !defined(HAVE_LINUXTHREADS) && !defined(__USE_MISC)
++#if defined(__LSB_VERSION__)
++typedef unsigned long	ulong;	/* Short for unsigned long */
++#elif !defined(HAVE_ULONG) && !defined(HAVE_LINUXTHREADS) && !defined(__USE_MISC)
+ typedef unsigned long	ulong;	/* Short for unsigned long */
+ #endif
+ #ifndef longlong_defined
+diff -urEb mariadb-connector-c-3.1.11-src.orig/plugins/pvio/pvio_socket.c mariadb-connector-c-3.1.11-src/plugins/pvio/pvio_socket.c
+--- mariadb-connector-c-3.1.11-src.orig/plugins/pvio/pvio_socket.c	2020-12-15 12:42:41.795904383 +0100
++++ mariadb-connector-c-3.1.11-src/plugins/pvio/pvio_socket.c	2020-12-16 09:29:31.061052964 +0100
+@@ -60,6 +60,11 @@
+ #define IS_SOCKET_EINTR(err) 0
+ #endif
+ 
++#if defined(__LSB_VERSION__)
++// WARNING: This definition might break true Linux Standard Base compatibility!
++#  define MSG_DONTWAIT 0x40 /* Nonblocking IO.  */
++#endif
++
+ #ifndef SOCKET_ERROR
+ #define SOCKET_ERROR -1
+ #endif