diff options
Diffstat (limited to 'dev-db/myodbc/files')
-rw-r--r-- | dev-db/myodbc/files/5.2.7-mariadb-dynamic-array.patch | 79 | ||||
-rw-r--r-- | dev-db/myodbc/files/5.2.7-my_malloc.patch | 18 | ||||
-rw-r--r-- | dev-db/myodbc/files/5.2.7-r1-cxxlinkage.patch | 40 | ||||
-rw-r--r-- | dev-db/myodbc/files/5.3-cmake-doc-path.patch | 43 | ||||
-rw-r--r-- | dev-db/myodbc/files/5.3.10-cxxlinkage.patch | 29 | ||||
-rw-r--r-- | dev-db/myodbc/files/5.3.10-mariadb.patch | 58 | ||||
-rw-r--r-- | dev-db/myodbc/files/cmake-doc-path.patch | 43 | ||||
-rw-r--r-- | dev-db/myodbc/files/odbc.ini.m4 | 17 | ||||
-rw-r--r-- | dev-db/myodbc/files/odbcinst.ini.m4 | 5 |
9 files changed, 332 insertions, 0 deletions
diff --git a/dev-db/myodbc/files/5.2.7-mariadb-dynamic-array.patch b/dev-db/myodbc/files/5.2.7-mariadb-dynamic-array.patch new file mode 100644 index 000000000000..6cfe7cd274b3 --- /dev/null +++ b/dev-db/myodbc/files/5.2.7-mariadb-dynamic-array.patch @@ -0,0 +1,79 @@ +diff -aurN a/driver/catalog_no_i_s.c b/driver/catalog_no_i_s.c +--- a/driver/catalog_no_i_s.c 2014-06-18 18:50:16.000000000 -0400 ++++ b/driver/catalog_no_i_s.c 2014-08-20 14:08:33.997339096 -0400 +@@ -1093,7 +1093,11 @@ + unsigned long *lengths; + SQLRETURN rc= SQL_SUCCESS; + ++#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 100001 ++ my_init_dynamic_array(&records, sizeof(MY_FOREIGN_KEY_FIELD), 0, 0, MYF(0)); ++#else + my_init_dynamic_array(&records, sizeof(MY_FOREIGN_KEY_FIELD), 0, 0); ++#endif + + /* Get the list of tables that match szCatalog and szTable */ + pthread_mutex_lock(&stmt->dbc->lock); +diff -aurN a/driver/desc.c b/driver/desc.c +--- a/driver/desc.c 2014-06-18 18:50:16.000000000 -0400 ++++ b/driver/desc.c 2014-08-20 14:07:37.409169269 -0400 +@@ -63,8 +63,12 @@ + but in desc_get_rec we manually get a pointer to it. This avoids + having to call set_dynamic after modifying the DESCREC. + */ ++#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 100001 ++ if (my_init_dynamic_array(&desc->records, sizeof(DESCREC), 0, 0, MYF(0))) ++#else + if (my_init_dynamic_array(&desc->records, sizeof(DESCREC), 0, 0)) ++#endif + { + x_free((char *)desc); + return NULL; + } +@@ -995,9 +1003,15 @@ + + /* copy the records */ + delete_dynamic(&dest->records); ++#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 100001 ++ if (my_init_dynamic_array(&dest->records, sizeof(DESCREC), ++ src->records.max_element, ++ src->records.alloc_increment, MYF(0))) ++#else + if (my_init_dynamic_array(&dest->records, sizeof(DESCREC), + src->records.max_element, + src->records.alloc_increment)) ++#endif + { + return set_desc_error(dest, "HY001", + "Memory allocation error", +diff -aurN a/driver/handle.c b/driver/handle.c +--- a/driver/handle.c 2014-06-18 18:50:16.000000000 -0400 ++++ b/driver/handle.c 2014-08-20 14:05:00.364248403 -0400 +@@ -403,7 +403,11 @@ + } + } + ++#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 100001 ++ my_init_dynamic_array(*param_bind, sizeof(MYSQL_BIND), elements, 10, MYF(0)); ++#else + my_init_dynamic_array(*param_bind, sizeof(MYSQL_BIND), elements, 10); ++#endif + memset((*param_bind)->buffer, 0, sizeof(MYSQL_BIND) * + (*param_bind)->max_element); + +diff -aurN a/driver/parse.c b/driver/parse.c +--- a/driver/parse.c 2014-06-18 18:50:16.000000000 -0400 ++++ b/driver/parse.c 2014-08-20 14:03:54.336383876 -0400 +@@ -129,8 +129,13 @@ + + /* TODO: Store offsets rather than ptrs. In this case we will be fine + if work with copy of the originally parsed string */ ++#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 100001 ++ my_init_dynamic_array(&pq->token, sizeof(uint), 20, 10, MYF(0)); ++ my_init_dynamic_array(&pq->param_pos, sizeof(uint), 10, 10, MYF(0)); ++#else + my_init_dynamic_array(&pq->token, sizeof(uint), 20, 10); + my_init_dynamic_array(&pq->param_pos, sizeof(uint), 10, 10); ++#endif + } + + return pq; diff --git a/dev-db/myodbc/files/5.2.7-my_malloc.patch b/dev-db/myodbc/files/5.2.7-my_malloc.patch new file mode 100644 index 000000000000..bc6c65ef3011 --- /dev/null +++ b/dev-db/myodbc/files/5.2.7-my_malloc.patch @@ -0,0 +1,18 @@ +diff -Brau a/util/odbcinstw.c b/util/odbcinstw.c +--- a/util/odbcinstw.c 2014-04-23 21:54:40.000000000 +0200 ++++ b/util/odbcinstw.c 2015-05-08 15:29:09.400568356 +0200 +@@ -68,13 +68,7 @@ + + if (lpszRetBuffer && cbRetBuffer) + { +- ret= malloc(cbRetBuffer + 1); +- /* +- We cannot rely on getting correct results from the next call of +- SQLGetPrivateProfileString. So, taking precautions against unititialized +- values in the allocated buffer. +- */ +- memset(ret, 0, cbRetBuffer + 1); ++ ret= my_malloc(cbRetBuffer + 1, MYF(MY_ZEROFILL)); + } + else + ret= NULL; diff --git a/dev-db/myodbc/files/5.2.7-r1-cxxlinkage.patch b/dev-db/myodbc/files/5.2.7-r1-cxxlinkage.patch new file mode 100644 index 000000000000..2bdb4a581c89 --- /dev/null +++ b/dev-db/myodbc/files/5.2.7-r1-cxxlinkage.patch @@ -0,0 +1,40 @@ +diff -uarN a/cmake/FindMySQL.cmake b/cmake/FindMySQL.cmake +--- a/cmake/FindMySQL.cmake 2014-06-18 18:50:16.000000000 -0400 ++++ b/cmake/FindMySQL.cmake 2014-08-20 10:05:00.191485304 -0400 +@@ -105,16 +105,16 @@ + # Finally remove the dot + STRING(REGEX REPLACE "[.]" "" MYSQL_NUM_VERSION "${MYSQL_NUM_VERSION}") + +- IF(MYSQL_CXX_LINKAGE OR MYSQL_NUM_VERSION GREATER 50603) ++ IF(MYSQL_CXX_LINKAGE) + EXECUTE_PROCESS(COMMAND ${MYSQL_CONFIG_EXECUTABLE} "--cxxflags" + OUTPUT_VARIABLE _mysql_config_output + ) + SET(MYSQL_CXX_LINKAGE 1) +- ELSE (MYSQL_CXX_LINKAGE OR MYSQL_NUM_VERSION GREATER 50603) ++ ELSE (MYSQL_CXX_LINKAGE) + EXECUTE_PROCESS(COMMAND ${MYSQL_CONFIG_EXECUTABLE} "--cflags" + OUTPUT_VARIABLE _mysql_config_output + ) +- ENDIF(MYSQL_CXX_LINKAGE OR MYSQL_NUM_VERSION GREATER 50603) ++ ENDIF(MYSQL_CXX_LINKAGE) + + # Remove the stl4port dependency + STRING(REGEX REPLACE "-library=stlport4" "" _mysql_config_output "${_mysql_config_output}") +diff -aurN mysql-connector-odbc-5.2.7-src.orig/CMakeLists.txt mysql-connector-odbc-5.2.7-src/CMakeLists.txt +--- a/CMakeLists.txt 2014-08-27 13:51:27.050553560 -0400 ++++ b/CMakeLists.txt 2014-08-27 13:55:41.702359680 -0400 +@@ -256,10 +256,9 @@ + SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin") + SET(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib") + +-SET(LIB_SUBDIR "lib") +-IF(RPM_BUILD AND CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64|ppc64|ppc64p7|s390x|sparc64)") +- SET(LIB_SUBDIR "lib64") +-ENDIF() ++IF(NOT LIB_SUBDIR) ++ MESSAGE(ERROR "LIB_SUBDIR is not set") ++ENDIF(NOT LIB_SUBDIR) + MESSAGE(STATUS "Installation library subdir: ${LIB_SUBDIR}") + + INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}) diff --git a/dev-db/myodbc/files/5.3-cmake-doc-path.patch b/dev-db/myodbc/files/5.3-cmake-doc-path.patch new file mode 100644 index 000000000000..54f35d41d96a --- /dev/null +++ b/dev-db/myodbc/files/5.3-cmake-doc-path.patch @@ -0,0 +1,43 @@ +=== modified file 'CMakeLists.txt' +--- a/CMakeLists.txt 2013-03-09 09:51:06 +0000 ++++ b/CMakeLists.txt 2013-03-09 11:05:27 +0000 +@@ -33,6 +33,12 @@ + + INCLUDE(version.cmake) + ++IF(WITH_DOCUMENTATION_INSTALL_PATH) ++ set(DOCUMENTATION_INSTALL_PATH ${WITH_DOCUMENTATION_INSTALL_PATH}) ++ELSE(WITH_DOCUMENTATION_INSTALL_PATH) ++ set(DOCUMENTATION_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/share/doc/myodbc-${CONNECTOR_MAJOR}.${CONNECTOR_MINOR}) ++ENDIF(WITH_DOCUMENTATION_INSTALL_PATH) ++ + #Default is to build both drivers + IF(UNICODE OR NOT ANSI) + MESSAGE(STATUS "Configuring to build Unicode driver") +@@ -329,19 +335,17 @@ + + ELSE(WIN32) + +- INSTALL(FILES ChangeLog DESTINATION .) +- INSTALL(FILES README DESTINATION .) +- INSTALL(FILES README.debug DESTINATION .) +- INSTALL(FILES INSTALL DESTINATION .) ++ INSTALL(FILES ChangeLog DESTINATION ${DOCUMENTATION_INSTALL_PATH}) ++ INSTALL(FILES README DESTINATION ${DOCUMENTATION_INSTALL_PATH}) ++ INSTALL(FILES README.debug DESTINATION ${DOCUMENTATION_INSTALL_PATH}) ++ INSTALL(FILES INSTALL DESTINATION ${DOCUMENTATION_INSTALL_PATH}) + IF(EXISTS "${CMAKE_SOURCE_DIR}/COPYING") +- INSTALL(FILES COPYING DESTINATION .) + ELSE() +- INSTALL(FILES LICENSE.mysql DESTINATION .) + ENDIF() + + ENDIF(WIN32) + +-INSTALL(FILES Licenses_for_Third-Party_Components.txt DESTINATION .) ++INSTALL(FILES Licenses_for_Third-Party_Components.txt DESTINATION ${DOCUMENTATION_INSTALL_PATH}) + + INCLUDE(CPack) + + + diff --git a/dev-db/myodbc/files/5.3.10-cxxlinkage.patch b/dev-db/myodbc/files/5.3.10-cxxlinkage.patch new file mode 100644 index 000000000000..796a13754f86 --- /dev/null +++ b/dev-db/myodbc/files/5.3.10-cxxlinkage.patch @@ -0,0 +1,29 @@ +diff -aurN a/cmake/FindMySQL.cmake b/cmake/FindMySQL.cmake +--- a/cmake/FindMySQL.cmake 2016-11-29 07:40:13.000000000 -0500 ++++ b/cmake/FindMySQL.cmake 2017-02-17 13:59:18.115389096 -0500 +@@ -747,7 +747,7 @@ + endif() + + if(NOT MYSQL_CXXFLAGS) +- if(MYSQL_CXX_LINKAGE OR MYSQL_VERSION_ID GREATER 50603) ++ if(MYSQL_CXX_LINKAGE) + _mysql_conf(MYSQL_CXXFLAGS "--cxxflags") + set(MYSQL_CXX_LINKAGE 1) + else() +diff -aurN a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2018-02-10 21:41:13.161553751 -0500 ++++ b/CMakeLists.txt 2018-02-10 21:45:20.038398824 -0500 +@@ -379,10 +379,9 @@ + SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin") + SET(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib") + +-SET(LIB_SUBDIR "lib") +-IF(RPM_BUILD AND CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64|ppc64|ppc64p7|s390x|sparc64)") +- SET(LIB_SUBDIR "lib64") +-ENDIF() ++IF(NOT LIB_SUBDIR) ++ MESSAGE(ERROR "LIB_SUBDIR is not set") ++ENDIF(NOT LIB_SUBDIR) + + MESSAGE(STATUS "Installation library subdir: ${LIB_SUBDIR}") + diff --git a/dev-db/myodbc/files/5.3.10-mariadb.patch b/dev-db/myodbc/files/5.3.10-mariadb.patch new file mode 100644 index 000000000000..c860349e4b71 --- /dev/null +++ b/dev-db/myodbc/files/5.3.10-mariadb.patch @@ -0,0 +1,58 @@ +--- a/include/sys_main.h 2018-01-19 05:36:38.000000000 -0500 ++++ b/include/sys_main.h 2018-03-01 11:40:04.554713079 -0500 +@@ -20,6 +20,8 @@ + extern "C" { + #endif + ++#include "sys/mysql/psi/psi_memory.h" ++ + #define MY_FAE 8 /* Fatal if any error */ + #define MY_WME 16 /* Write message on error */ + #define MY_ZEROFILL 32 /* my_malloc(), fill array with zero */ +--- a/driver/connect.c 2018-01-19 05:36:38.000000000 -0500 ++++ b/driver/connect.c 2018-03-01 11:39:51.458676373 -0500 +@@ -179,7 +179,7 @@ + /* Set other connection options */ + + if (ds->allow_big_results || ds->safe) +-#if MYSQL_VERSION_ID >= 50709 ++#if MYSQL_VERSION_ID >= 50709 && !defined(MARIADB_BASE_VERSION) + mysql_options(mysql, MYSQL_OPT_MAX_ALLOWED_PACKET, &max_long); + #else + /* max_allowed_packet is a magical mysql macro. */ +@@ -252,7 +252,7 @@ + ds_get_utf8attr(ds->rsakey, &ds->rsakey8)); + } + #endif +-#if MYSQL_VERSION_ID >= 50710 ++#if MYSQL_VERSION_ID >= 50710 && !defined(MARIADB_BASE_VERSION) + { + char tls_options[128] = { 0 }; + if (!ds->no_tls_1) +@@ -323,7 +323,7 @@ + #endif + + mysql->options.use_ssl = !ds->disable_ssl_default; +-#if MYSQL_VERSION_ID >= 50703 ++#if MYSQL_VERSION_ID >= 50703 && !defined(MARIADB_BASE_VERSION) + { + if (ds->ssl_enforce) + { +@@ -332,7 +332,7 @@ + } + #endif + +-#if MYSQL_VERSION_ID >= 50711 ++#if MYSQL_VERSION_ID >= 50711 && !defined(MARIADB_BASE_VERSION) + if (ds->sslmode) + { + unsigned int mode = 0; +@@ -510,7 +510,7 @@ + } + } + +-#if MYSQL_VERSION_ID >= 50709 ++#if MYSQL_VERSION_ID >= 50709 && !defined(MARIADB_BASE_VERSION) + mysql_get_option(mysql, MYSQL_OPT_NET_BUFFER_LENGTH, &dbc->net_buffer_len); + #else + // for older versions just use net_buffer_length() macro diff --git a/dev-db/myodbc/files/cmake-doc-path.patch b/dev-db/myodbc/files/cmake-doc-path.patch new file mode 100644 index 000000000000..c7f7d9d37ce7 --- /dev/null +++ b/dev-db/myodbc/files/cmake-doc-path.patch @@ -0,0 +1,43 @@ +=== modified file 'CMakeLists.txt' +--- CMakeLists.txt 2013-03-09 09:51:06 +0000 ++++ CMakeLists.txt 2013-03-09 11:05:27 +0000 +@@ -33,6 +33,12 @@ + SET(CONNECTOR_MAJOR "5") + SET(CONNECTOR_MINOR "2") + ++IF(WITH_DOCUMENTATION_INSTALL_PATH) ++ set(DOCUMENTATION_INSTALL_PATH ${WITH_DOCUMENTATION_INSTALL_PATH}) ++ELSE(WITH_DOCUMENTATION_INSTALL_PATH) ++ set(DOCUMENTATION_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/share/doc/myodbc-${CONNECTOR_MAJOR}.${CONNECTOR_MINOR}) ++ENDIF(WITH_DOCUMENTATION_INSTALL_PATH) ++ + IF(CONNECTOR_MINOR LESS 10) + SET(CONNECTOR_MINOR_PADDED "0${CONNECTOR_MINOR}") + ELSE(CONNECTOR_MINOR LESS 10) +@@ -329,19 +335,17 @@ + + ELSE(WIN32) + +- INSTALL(FILES ChangeLog DESTINATION .) +- INSTALL(FILES README DESTINATION .) +- INSTALL(FILES README.debug DESTINATION .) +- INSTALL(FILES INSTALL DESTINATION .) ++ INSTALL(FILES ChangeLog DESTINATION ${DOCUMENTATION_INSTALL_PATH}) ++ INSTALL(FILES README DESTINATION ${DOCUMENTATION_INSTALL_PATH}) ++ INSTALL(FILES README.debug DESTINATION ${DOCUMENTATION_INSTALL_PATH}) ++ INSTALL(FILES INSTALL DESTINATION ${DOCUMENTATION_INSTALL_PATH}) + IF(EXISTS "${CMAKE_SOURCE_DIR}/COPYING") +- INSTALL(FILES COPYING DESTINATION .) + ELSE() +- INSTALL(FILES LICENSE.mysql DESTINATION .) + ENDIF() + + ENDIF(WIN32) + +-INSTALL(FILES Licenses_for_Third-Party_Components.txt DESTINATION .) ++INSTALL(FILES Licenses_for_Third-Party_Components.txt DESTINATION ${DOCUMENTATION_INSTALL_PATH}) + + INCLUDE(CPack) + + + diff --git a/dev-db/myodbc/files/odbc.ini.m4 b/dev-db/myodbc/files/odbc.ini.m4 new file mode 100644 index 000000000000..4255730a3e21 --- /dev/null +++ b/dev-db/myodbc/files/odbc.ini.m4 @@ -0,0 +1,17 @@ +# vim:ts=4 noexpandtab ft=dosini: +# +[ODBC Data Sources] +__PN__-test = MySQL ODBC __PF__ Driver Testing DSN + +# see http://www.mysql.com/products/myodbc/faq_toc.html +# for details about the following entry +[__PN__-test] +Description = MySQL ODBC __PF__ Driver Testing DSN +Driver = __PN__ +Socket = /var/run/mysqld/mysqld.sock +Server = localhost +User = root +Database = test +Option = 3 +#Port = +#Password = diff --git a/dev-db/myodbc/files/odbcinst.ini.m4 b/dev-db/myodbc/files/odbcinst.ini.m4 new file mode 100644 index 000000000000..744503c5ac05 --- /dev/null +++ b/dev-db/myodbc/files/odbcinst.ini.m4 @@ -0,0 +1,5 @@ +# vim:ts=4 noexpandtab ft=dosini: +# +[__PN__] +Description = MySQL ODBC __PF__ Driver +Driver = /usr/lib/libmyodbc3.so |