summaryrefslogtreecommitdiff
path: root/mysqlcppconn
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-03-14 12:12:31 +0100
committerFridrich Štrba <fridrich.strba@bluewin.ch>2013-03-14 12:12:41 +0100
commit95fe9541cabda703e56f2d36d2887d9c987cb197 (patch)
tree8a966bb54f5bc945bdf02ed50783acd9077f118e /mysqlcppconn
parent46cef4f2fa797aade35ea48f3e46159c6141fcfc (diff)
Use "static" binding to mariadb client library
Change-Id: Idece6e4fb6b806be7037d98c7d6ffe6a74f0b30e
Diffstat (limited to 'mysqlcppconn')
-rw-r--r--mysqlcppconn/UnpackedTarball_mysqlcppconn.mk9
-rw-r--r--mysqlcppconn/binding_config.h (renamed from mysqlcppconn/binding_static.h)0
-rw-r--r--mysqlcppconn/binding_dynamic.h2
-rw-r--r--mysqlcppconn/patches/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch11
-rw-r--r--mysqlcppconn/patches/mysql-connector-c++-1.1.0.patch30
5 files changed, 32 insertions, 20 deletions
diff --git a/mysqlcppconn/UnpackedTarball_mysqlcppconn.mk b/mysqlcppconn/UnpackedTarball_mysqlcppconn.mk
index eeca11ed357b..3f86236bea24 100644
--- a/mysqlcppconn/UnpackedTarball_mysqlcppconn.mk
+++ b/mysqlcppconn/UnpackedTarball_mysqlcppconn.mk
@@ -13,15 +13,10 @@ $(eval $(call gb_UnpackedTarball_set_tarball,mysqlcppconn,$(MYSQLCPPCONN_TARBALL
$(eval $(call gb_UnpackedTarball_add_file,mysqlcppconn,cppconn/config.h,mysqlcppconn/config.h))
-ifeq ($(SYSTEM_MARIADB),YES)
-$(eval $(call gb_UnpackedTarball_add_file,mysqlcppconn,driver/nativeapi/binding_config.h,mysqlcppconn/binding_static.h))
-else
-$(eval $(call gb_UnpackedTarball_add_file,mysqlcppconn,driver/nativeapi/binding_config.h,mysqlcppconn/binding_dynamic.h))
-endif
+$(eval $(call gb_UnpackedTarball_add_file,mysqlcppconn,driver/nativeapi/binding_config.h,mysqlcppconn/binding_config.h))
+
$(eval $(call gb_UnpackedTarball_add_patches,mysqlcppconn,\
mysqlcppconn/patches/mysql-connector-c++-1.1.0.patch \
- $(if $(filter NO,$(SYSTEM_MARIADB)), \
- mysqlcppconn/patches/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch) \
mysqlcppconn/patches/default_to_protocol_tcp.patch \
))
diff --git a/mysqlcppconn/binding_static.h b/mysqlcppconn/binding_config.h
index 85506c6c5305..85506c6c5305 100644
--- a/mysqlcppconn/binding_static.h
+++ b/mysqlcppconn/binding_config.h
diff --git a/mysqlcppconn/binding_dynamic.h b/mysqlcppconn/binding_dynamic.h
deleted file mode 100644
index 1ee8e37a2f18..000000000000
--- a/mysqlcppconn/binding_dynamic.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#define HAVE_DLFCN_H 1
-//#define MYSQLCLIENT_STATIC_BINDING 1
diff --git a/mysqlcppconn/patches/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch b/mysqlcppconn/patches/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch
deleted file mode 100644
index 0644dbbabade..000000000000
--- a/mysqlcppconn/patches/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- misc/mysql-connector-c++-1.1.0/driver/nativeapi/mysql_client_api.h 2010-09-10 11:47:47.000000000 +0200
-+++ misc/build/mysql-connector-c++-1.1.0/driver/nativeapi/mysql_client_api.h 2011-12-08 20:22:29.000000000 +0100
-@@ -107,6 +107,8 @@
-
- typedef MYSQL_RES * (STDCALL *ptr2mysql_use_result)(MYSQL *);
-
-+typedef unsigned long (STDCALL *ptr2mysql_realescapestring)(MYSQL *, char *, const char *, unsigned long);
-+
- /* Prepared Statement stmt_* functions */
- typedef my_ulonglong (STDCALL *ptr2mysql_stmt_affected_rows)(MYSQL_STMT *);
-
diff --git a/mysqlcppconn/patches/mysql-connector-c++-1.1.0.patch b/mysqlcppconn/patches/mysql-connector-c++-1.1.0.patch
index c7fd21b58ba5..8ddbd74c98f3 100644
--- a/mysqlcppconn/patches/mysql-connector-c++-1.1.0.patch
+++ b/mysqlcppconn/patches/mysql-connector-c++-1.1.0.patch
@@ -115,3 +115,33 @@
namespace sql
{
+--- misc/mysql-connector-c++-1.1.0/driver/nativeapi/libmysql_static_proxy.cpp 2010-09-10 11:47:47.000000000 +0200
++++ misc/build/mysql-connector-c++-1.1.0/driver/nativeapi/libmysql_static_proxy.cpp 2013-03-14 11:10:14.850848088 +0100
+@@ -213,7 +213,8 @@
+ int
+ LibmysqlStaticProxy::library_init(int argc,char **argv,char **groups)
+ {
+- return ::mysql_library_init(argc, argv, groups);
++// return ::mysql_library_init(argc, argv, groups);
++ return 0;
+ }
+ /* }}} */
+
+@@ -222,7 +223,7 @@
+ void
+ LibmysqlStaticProxy::library_end()
+ {
+- return ::mysql_library_end();
++// return ::mysql_library_end();
+ }
+ /* }}} */
+
+@@ -352,7 +353,7 @@
+ const char * capath,
+ const char * cipher)
+ {
+- return ::mysql_ssl_set(mysql, key, cert, ca, capath, cipher);
++ return ::mysql_ssl_set(mysql, key, cert, ca, capath);
+ }
+ /* }}} */
+