forked from pool/mariadb-connector-c
Accepting request 598533 from server:database
OBS-URL: https://build.opensuse.org/request/show/598533 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mariadb-connector-c?expand=0&rev=10
This commit is contained in:
commit
7501230901
180
0334aa48.patch
180
0334aa48.patch
@ -1,180 +0,0 @@
|
|||||||
commit 0334aa4811ae751d3362facad136c25b9765693a
|
|
||||||
Author: Lawrin Novitsky <lawrin.novitsky@mariadb.com>
|
|
||||||
Date: Mon Aug 14 17:23:42 2017 +0200
|
|
||||||
|
|
||||||
Implementation and testcase for CONC-275 - skipping particular paramset in bulk operation - with help of special indicator value STMT_INDICATOR_IGNORE_ROW set in any column of the row.
|
|
||||||
The revision also adds some (mainly VS specific) file/dirs definitions to .gitignore to make 'gid status' usable on Windows, and the typo in bulk1 testsuite
|
|
||||||
|
|
||||||
diff --git a/include/mariadb_stmt.h b/include/mariadb_stmt.h
|
|
||||||
index 9e67ad8..5e1c711 100644
|
|
||||||
--- a/include/mariadb_stmt.h
|
|
||||||
+++ b/include/mariadb_stmt.h
|
|
||||||
@@ -81,7 +81,8 @@ enum enum_indicator_type
|
|
||||||
STMT_INDICATOR_NONE=0,
|
|
||||||
STMT_INDICATOR_NULL=1,
|
|
||||||
STMT_INDICATOR_DEFAULT=2,
|
|
||||||
- STMT_INDICATOR_IGNORE=3
|
|
||||||
+ STMT_INDICATOR_IGNORE=3,
|
|
||||||
+ STMT_INDICATOR_IGNORE_ROW=4
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
diff --git a/libmariadb/mariadb_stmt.c b/libmariadb/mariadb_stmt.c
|
|
||||||
index aba845e..869c6ea 100644
|
|
||||||
--- a/libmariadb/mariadb_stmt.c
|
|
||||||
+++ b/libmariadb/mariadb_stmt.c
|
|
||||||
@@ -797,7 +797,21 @@ mem_error:
|
|
||||||
}
|
|
||||||
/* }}} */
|
|
||||||
|
|
||||||
-/* {{{ mysqlnd_stmt_execute_generate_bulk_request */
|
|
||||||
+/* {{{ mysql_stmt_skip_paramset */
|
|
||||||
+my_bool mysql_stmt_skip_paramset(MYSQL_STMT *stmt, uint row)
|
|
||||||
+{
|
|
||||||
+ uint i;
|
|
||||||
+ for (i=0; i < stmt->param_count; i++)
|
|
||||||
+ {
|
|
||||||
+ if (ma_get_indicator(stmt, i, row) == STMT_INDICATOR_IGNORE_ROW)
|
|
||||||
+ return '\1';
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return '\0';
|
|
||||||
+}
|
|
||||||
+/* }}} */
|
|
||||||
+
|
|
||||||
+/* {{{ mysql_stmt_execute_generate_bulk_request */
|
|
||||||
unsigned char* mysql_stmt_execute_generate_bulk_request(MYSQL_STMT *stmt, size_t *request_len)
|
|
||||||
{
|
|
||||||
/* execute packet has the following format:
|
|
||||||
@@ -820,6 +834,7 @@ unsigned char* mysql_stmt_execute_generate_bulk_request(MYSQL_STMT *stmt, size_t
|
|
||||||
STMT_INDICATOR_NULL 1
|
|
||||||
STMT_INDICATOR_DEFAULT 2
|
|
||||||
STMT_INDICATOR_IGNORE 3
|
|
||||||
+ STMT_INDICATOR_SKIP_SET 4
|
|
||||||
n data from bind buffer
|
|
||||||
|
|
||||||
*/
|
|
||||||
@@ -894,6 +909,9 @@ unsigned char* mysql_stmt_execute_generate_bulk_request(MYSQL_STMT *stmt, size_t
|
|
||||||
/* calculate data size */
|
|
||||||
for (j=0; j < stmt->array_size; j++)
|
|
||||||
{
|
|
||||||
+ if (mysql_stmt_skip_paramset(stmt, j))
|
|
||||||
+ continue;
|
|
||||||
+
|
|
||||||
for (i=0; i < stmt->param_count; i++)
|
|
||||||
{
|
|
||||||
size_t size= 0;
|
|
||||||
diff --git a/unittest/libmariadb/bulk1.c b/unittest/libmariadb/bulk1.c
|
|
||||||
index e5f6ec9..c6623ce 100644
|
|
||||||
--- a/unittest/libmariadb/bulk1.c
|
|
||||||
+++ b/unittest/libmariadb/bulk1.c
|
|
||||||
@@ -588,7 +588,7 @@ static int test_conc243(MYSQL *mysql)
|
|
||||||
if (strcmp(row[0], "Monty") || strcmp(row[1], "Widenius"))
|
|
||||||
{
|
|
||||||
mysql_free_result(result);
|
|
||||||
- diag("Wrong walues");
|
|
||||||
+ diag("Wrong values");
|
|
||||||
return FAIL;
|
|
||||||
}
|
|
||||||
mysql_free_result(result);
|
|
||||||
@@ -767,6 +767,92 @@ static int test_char_conv2(MYSQL *mysql)
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
+
|
|
||||||
+static int bulk_skip_row(MYSQL *mysql)
|
|
||||||
+{
|
|
||||||
+ MYSQL_STMT *stmt;
|
|
||||||
+ MYSQL_BIND bind[3];
|
|
||||||
+ MYSQL_RES *result;
|
|
||||||
+ MYSQL_ROW row;
|
|
||||||
+
|
|
||||||
+ struct st_data {
|
|
||||||
+ unsigned long id;
|
|
||||||
+ char id_ind;
|
|
||||||
+ char forename[30];
|
|
||||||
+ char forename_ind;
|
|
||||||
+ char surname[30];
|
|
||||||
+ char surname_ind;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ struct st_data data[]={
|
|
||||||
+ { 0, STMT_INDICATOR_NULL, "Monty", STMT_INDICATOR_NTS, "Widenius", STMT_INDICATOR_IGNORE_ROW },
|
|
||||||
+ { 0, STMT_INDICATOR_IGNORE_ROW, "David", STMT_INDICATOR_NTS, "Axmark", STMT_INDICATOR_NTS },
|
|
||||||
+ { 0, STMT_INDICATOR_NULL, "default", STMT_INDICATOR_DEFAULT, "N.N.", STMT_INDICATOR_NTS },
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ unsigned int array_size= 3;
|
|
||||||
+ size_t row_size= sizeof(struct st_data);
|
|
||||||
+ int rc;
|
|
||||||
+
|
|
||||||
+ rc= mysql_query(mysql, "DROP TABLE IF EXISTS bulk_example2");
|
|
||||||
+ check_mysql_rc(rc, mysql);
|
|
||||||
+
|
|
||||||
+ rc= mysql_query(mysql, "CREATE TABLE bulk_example2 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,"\
|
|
||||||
+ "forename CHAR(30) NOT NULL DEFAULT 'unknown', surname CHAR(30))");
|
|
||||||
+ check_mysql_rc(rc, mysql);
|
|
||||||
+
|
|
||||||
+ stmt= mysql_stmt_init(mysql);
|
|
||||||
+ rc= mysql_stmt_prepare(stmt, "INSERT INTO bulk_example2 VALUES (?,?,?)", -1);
|
|
||||||
+ check_stmt_rc(rc, stmt);
|
|
||||||
+
|
|
||||||
+ memset(bind, 0, sizeof(MYSQL_BIND) * 3);
|
|
||||||
+
|
|
||||||
+ /* We autogenerate id's, so all indicators are STMT_INDICATOR_NULL */
|
|
||||||
+ bind[0].u.indicator= &data[0].id_ind;
|
|
||||||
+ bind[0].buffer_type= MYSQL_TYPE_LONG;
|
|
||||||
+
|
|
||||||
+ bind[1].buffer= &data[0].forename;
|
|
||||||
+ bind[1].buffer_type= MYSQL_TYPE_STRING;
|
|
||||||
+ bind[1].u.indicator= &data[0].forename_ind;
|
|
||||||
+
|
|
||||||
+ bind[2].buffer_type= MYSQL_TYPE_STRING;
|
|
||||||
+ bind[2].buffer= &data[0].surname;
|
|
||||||
+ bind[2].u.indicator= &data[0].surname_ind;
|
|
||||||
+
|
|
||||||
+ /* set array size */
|
|
||||||
+ mysql_stmt_attr_set(stmt, STMT_ATTR_ARRAY_SIZE, &array_size);
|
|
||||||
+
|
|
||||||
+ /* set row size */
|
|
||||||
+ mysql_stmt_attr_set(stmt, STMT_ATTR_ROW_SIZE, &row_size);
|
|
||||||
+
|
|
||||||
+ /* bind parameter */
|
|
||||||
+ mysql_stmt_bind_param(stmt, bind);
|
|
||||||
+
|
|
||||||
+ /* execute */
|
|
||||||
+ rc= mysql_stmt_execute(stmt);
|
|
||||||
+ check_stmt_rc(rc, stmt);
|
|
||||||
+
|
|
||||||
+ mysql_stmt_close(stmt);
|
|
||||||
+
|
|
||||||
+ rc= mysql_query(mysql, "SELECT forename, surname FROM bulk_example2");
|
|
||||||
+ check_mysql_rc(rc, mysql);
|
|
||||||
+
|
|
||||||
+ result= mysql_store_result(mysql);
|
|
||||||
+ FAIL_IF(!result || mysql_num_rows(result) != 1, "Invalid resultset");
|
|
||||||
+
|
|
||||||
+ row = mysql_fetch_row(result);
|
|
||||||
+ if (strcmp(row[0], "unknown") || strcmp(row[1], "N.N."))
|
|
||||||
+ {
|
|
||||||
+ mysql_free_result(result);
|
|
||||||
+ diag("Wrong values");
|
|
||||||
+ return FAIL;
|
|
||||||
+ }
|
|
||||||
+ mysql_free_result(result);
|
|
||||||
+ rc= mysql_query(mysql, "DROP TABLE bulk_example2");
|
|
||||||
+ check_mysql_rc(rc, mysql);
|
|
||||||
+ return OK;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
struct my_tests_st my_tests[] = {
|
|
||||||
{"check_bulk", check_bulk, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
|
||||||
{"test_char_conv1", test_char_conv1, TEST_CONNECTION_NEW, 0, NULL, NULL},
|
|
||||||
@@ -780,6 +866,7 @@ struct my_tests_st my_tests[] = {
|
|
||||||
{"bulk3", bulk3, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
|
||||||
{"bulk4", bulk4, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
|
||||||
{"bulk_null", bulk_null, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
|
||||||
+ {"bulk_skip_row", bulk_skip_row, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
|
||||||
{NULL, NULL, 0, 0, NULL, NULL}
|
|
||||||
};
|
|
||||||
|
|
@ -2,11 +2,11 @@ Author: Adam Majer <amajer@suse.de>
|
|||||||
Date: Fri Mar 3 15:59:09 CET 2017
|
Date: Fri Mar 3 15:59:09 CET 2017
|
||||||
Summary: Remove pure ugliness with paths
|
Summary: Remove pure ugliness with paths
|
||||||
|
|
||||||
Index: mariadb-connector-c-3.0.2-src/mariadb_config/mariadb_config.c.in
|
Index: mariadb-connector-c-3.0.3-src/mariadb_config/mariadb_config.c.in
|
||||||
===================================================================
|
===================================================================
|
||||||
--- mariadb-connector-c-3.0.2-src.orig/mariadb_config/mariadb_config.c.in
|
--- mariadb-connector-c-3.0.3-src.orig/mariadb_config/mariadb_config.c.in
|
||||||
+++ mariadb-connector-c-3.0.2-src/mariadb_config/mariadb_config.c.in
|
+++ mariadb-connector-c-3.0.3-src/mariadb_config/mariadb_config.c.in
|
||||||
@@ -5,13 +5,13 @@
|
@@ -5,14 +5,14 @@
|
||||||
|
|
||||||
static char *mariadb_progname;
|
static char *mariadb_progname;
|
||||||
|
|
||||||
@ -18,15 +18,16 @@ Index: mariadb-connector-c-3.0.2-src/mariadb_config/mariadb_config.c.in
|
|||||||
#define LIBS_SYS "@extra_dynamic_LDFLAGS@"
|
#define LIBS_SYS "@extra_dynamic_LDFLAGS@"
|
||||||
#define CFLAGS INCLUDE
|
#define CFLAGS INCLUDE
|
||||||
#define VERSION "@MARIADB_CLIENT_VERSION@"
|
#define VERSION "@MARIADB_CLIENT_VERSION@"
|
||||||
|
#define CC_VERSION "@CPACK_PACKAGE_VERSION@"
|
||||||
-#define PLUGIN_DIR "@CMAKE_INSTALL_PREFIX@/@INSTALL_PLUGINDIR@"
|
-#define PLUGIN_DIR "@CMAKE_INSTALL_PREFIX@/@INSTALL_PLUGINDIR@"
|
||||||
+#define PLUGIN_DIR "@INSTALL_PLUGINDIR@"
|
+#define PLUGIN_DIR "@INSTALL_PLUGINDIR@"
|
||||||
#define SOCKET "@MARIADB_UNIX_ADDR@"
|
#define SOCKET "@MARIADB_UNIX_ADDR@"
|
||||||
#define PORT "@MARIADB_PORT@"
|
#define PORT "@MARIADB_PORT@"
|
||||||
#define TLS_LIBRARY_VERSION "@TLS_LIBRARY_VERSION@"
|
#define TLS_LIBRARY_VERSION "@TLS_LIBRARY_VERSION@"
|
||||||
Index: mariadb-connector-c-3.0.2-src/mariadb_config/libmariadb.pc.in
|
Index: mariadb-connector-c-3.0.3-src/mariadb_config/libmariadb.pc.in
|
||||||
===================================================================
|
===================================================================
|
||||||
--- mariadb-connector-c-3.0.2-src.orig/mariadb_config/libmariadb.pc.in
|
--- mariadb-connector-c-3.0.3-src.orig/mariadb_config/libmariadb.pc.in
|
||||||
+++ mariadb-connector-c-3.0.2-src/mariadb_config/libmariadb.pc.in
|
+++ mariadb-connector-c-3.0.3-src/mariadb_config/libmariadb.pc.in
|
||||||
@@ -6,14 +6,14 @@
|
@@ -6,14 +6,14 @@
|
||||||
# Dan Nicholson’s Guide to pkg-config (http://www.freedesktop.org/wiki/Software/pkg-config/)
|
# Dan Nicholson’s Guide to pkg-config (http://www.freedesktop.org/wiki/Software/pkg-config/)
|
||||||
#
|
#
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:518d14b8d77838370767d73f9bf1674f46232e1a2a34d4195bd38f52a3033758
|
|
||||||
size 662569
|
|
@ -1,11 +0,0 @@
|
|||||||
-----BEGIN PGP SIGNATURE-----
|
|
||||||
Version: GnuPG v2
|
|
||||||
|
|
||||||
iQEcBAABCAAGBQJZcM5uAAoJEM4aPdXjyU9JkZ8H/Rg3zVcfYukS9GKM5/JhfrMX
|
|
||||||
/Cy0ideQtuGbgtEQJFFASC1d0Nnc2EoQj+xO0R6R0mvUV5FKT/CS28RrcgXvZEyu
|
|
||||||
3yy5amq3YbaMojqqevms+5TDbhjGFy0SceBSNU2NOYdFjhorFPwqptXDoyb1Xrno
|
|
||||||
DiUAFLmY4n+vlUZYmMgMXt/nz7I6+u/zUEvCBo38HmIZwTPrw0/xXQsk8WW697yK
|
|
||||||
2+O59RqKFF0qQGQBKl7MRdbDGXSdxlzYwWBXcB/P1mxO3Ac1TvO0NVIqdcKLsRvo
|
|
||||||
x70bzHtBeXwTjvYCZTKArwz/xh+uQioqgZh3ds4ZDcgovMSwpWNHJ3nhdLX8SMc=
|
|
||||||
=A5ve
|
|
||||||
-----END PGP SIGNATURE-----
|
|
3
mariadb-connector-c-3.0.3-src.tar.gz
Normal file
3
mariadb-connector-c-3.0.3-src.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:210f0ee3414b235d3db8e98e9e5a0a98381ecf771e67ca4a688036368984eeea
|
||||||
|
size 666928
|
11
mariadb-connector-c-3.0.3-src.tar.gz.asc
Normal file
11
mariadb-connector-c-3.0.3-src.tar.gz.asc
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
Version: GnuPG v2
|
||||||
|
|
||||||
|
iQEcBAABCAAGBQJaX2KNAAoJEM4aPdXjyU9JbowIAIov5HuFK79EHQgAdZ+s2AVZ
|
||||||
|
ZdPb5VIR8ql3lbr36jPtD0x/Tpn9IsHSfxMEQ+MZBNp4wDurKTIsloSZsRCXfZuX
|
||||||
|
5WxRKn6yeYHA6wwe9vJtydS4uRHxbZta8zfIHZqH5NR328Qrsn4Okj7vk5Ps/r8Z
|
||||||
|
xXHE07eaEjl7bDX6ehLoaLazz3gIOlLl0CB2VWRN3OVQw31CgP9Ejmcl1uCMA33g
|
||||||
|
kANYQZsZB5hyEBultpesuSvxnJmNBK15d77mS6erGBNPSMMms8u/Mju4kqgC8s32
|
||||||
|
SXvkswFqFzgHpTK5V2e7//H+muGeaQBzR/L8Rs0Yi8oLmkT3u6qS2KlApn9N9ZU=
|
||||||
|
=bU47
|
||||||
|
-----END PGP SIGNATURE-----
|
@ -1,3 +1,53 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 19 10:05:16 UTC 2018 - kstreitova@suse.com
|
||||||
|
|
||||||
|
- New upstream version 3.0.3
|
||||||
|
* Added support for new utf8mb4 character sets
|
||||||
|
* MDEV-9059: Bundle first command with authentication packet
|
||||||
|
* Build: support static OpenSSL on Windows
|
||||||
|
* MDEV-14101: Add support for tls-version, via
|
||||||
|
mysql_options(mysql, MARIADB_OPT_TLS_VERSION, value),
|
||||||
|
where value must be "TLSv1.1", "TLSv1.2" or "TLSv1.3".
|
||||||
|
* CONC-275: New indicator type STMT_INDICATOR_IGNORE_ROW for
|
||||||
|
skipping particular parameter set in bulk operation
|
||||||
|
(prepared statements).
|
||||||
|
* MDEV-10361: Don't try to reconnect twice if mysql_ping failed.
|
||||||
|
* Build fix for TSAN build with Clang
|
||||||
|
* CONC-302: Fix output of mariadb_config
|
||||||
|
* CONC-301: In case of a truncation the statement status was not
|
||||||
|
updated correctly and further calls to mysql_stmt_fetch_column
|
||||||
|
failed
|
||||||
|
* MDEV-14647: Fixed crash when client receives extended ok packet
|
||||||
|
with SESSION_TRACK_STATE_CHANGE information flag
|
||||||
|
* CONC-297: setting MYSQL_OPT_LOCAL_INFILE failed on big endian
|
||||||
|
systems.
|
||||||
|
* MDEV-14514: mariadb_config returned wrong exit code when
|
||||||
|
specifying an invalid option
|
||||||
|
* MDEV-11546: Fixed timeout problem in Schannel
|
||||||
|
* CONC-277: Allow reinitialization of the library if
|
||||||
|
mysql_server_end() was called.
|
||||||
|
* CONC-292: Fixed malloc result check in dynamic columns
|
||||||
|
* MDEV-14165: The metadata length value for a column with a
|
||||||
|
zerofill flag was calculated with a fixed length instead of using
|
||||||
|
the reported length.
|
||||||
|
* CONC-286: Force TLS/SSL usage if fingerprint parameters were
|
||||||
|
specified.
|
||||||
|
* CONC-282: Connector/C now provides additional information for
|
||||||
|
package version
|
||||||
|
* mariadb_config --cc_version lists the package version
|
||||||
|
* Beside MARIADB_PACKAGE_VERSION numeric representation
|
||||||
|
MARIADB_PACKAGE_VERSION_ID can be used now within preprocessor
|
||||||
|
directives.
|
||||||
|
* MDEV-13959: Fixed duplicate if condition in dynamic columns
|
||||||
|
* Added MARIADB_BASE_VERSION definition in mariadb_version.h to
|
||||||
|
distnguish MARIADB from MySQL
|
||||||
|
* CONC-271: installation layout fix for RPM
|
||||||
|
- refresh the following patches:
|
||||||
|
* absolute_path_fix.patch
|
||||||
|
* private_library.patch
|
||||||
|
- drop 0334aa48.patch that is no longer needed
|
||||||
|
- use %license instead of %doc [bsc#1082318]
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Nov 19 07:41:13 UTC 2017 - mpluskal@suse.com
|
Sun Nov 19 07:41:13 UTC 2017 - mpluskal@suse.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package mariadb-connector-c
|
# spec file for package mariadb-connector-c
|
||||||
#
|
#
|
||||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -25,10 +25,10 @@
|
|||||||
%endif
|
%endif
|
||||||
%bcond_with sqlite3
|
%bcond_with sqlite3
|
||||||
Name: mariadb-connector-c
|
Name: mariadb-connector-c
|
||||||
Version: 3.0.2
|
Version: 3.0.3
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: MariaDB connector in C
|
Summary: MariaDB connector in C
|
||||||
License: LGPL-2.1+
|
License: LGPL-2.1-or-later
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Url: https://github.com/MariaDB/mariadb-connector-c
|
Url: https://github.com/MariaDB/mariadb-connector-c
|
||||||
Source: https://downloads.mariadb.com/Connectors/c/connector-c-%{version}/%{name}-%{version}-src.tar.gz
|
Source: https://downloads.mariadb.com/Connectors/c/connector-c-%{version}/%{name}-%{version}-src.tar.gz
|
||||||
@ -39,7 +39,6 @@ Source3: baselibs.conf
|
|||||||
Patch1: mariadb-connector-c-2.3.1_unresolved_symbols.patch
|
Patch1: mariadb-connector-c-2.3.1_unresolved_symbols.patch
|
||||||
Patch3: absolute_path_fix.patch
|
Patch3: absolute_path_fix.patch
|
||||||
Patch4: private_library.patch
|
Patch4: private_library.patch
|
||||||
Patch5: 0334aa48.patch
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: curl-devel
|
BuildRequires: curl-devel
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
@ -114,7 +113,6 @@ This package holds the development files.
|
|||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
%patch5 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake \
|
%cmake \
|
||||||
@ -152,7 +150,8 @@ install -Dpm 0644 build/include/ma_config.h \
|
|||||||
%postun -n %{libname}private -p /sbin/ldconfig
|
%postun -n %{libname}private -p /sbin/ldconfig
|
||||||
|
|
||||||
%files -n %{libname}%{sover}
|
%files -n %{libname}%{sover}
|
||||||
%doc README COPYING.LIB
|
%license COPYING.LIB
|
||||||
|
%doc README
|
||||||
%{_libdir}/libmariadb.so.%{sover}
|
%{_libdir}/libmariadb.so.%{sover}
|
||||||
|
|
||||||
%files -n %{libname}_plugins
|
%files -n %{libname}_plugins
|
||||||
|
@ -8,11 +8,11 @@ static linking, create a private shared library that simply
|
|||||||
exports all symbols. With the exception of exported symbols, it is
|
exports all symbols. With the exception of exported symbols, it is
|
||||||
identical to the regular library.
|
identical to the regular library.
|
||||||
|
|
||||||
Index: mariadb-connector-c-3.0.2-src/libmariadb/CMakeLists.txt
|
Index: mariadb-connector-c-3.0.3-src/libmariadb/CMakeLists.txt
|
||||||
===================================================================
|
===================================================================
|
||||||
--- mariadb-connector-c-3.0.2-src.orig/libmariadb/CMakeLists.txt
|
--- mariadb-connector-c-3.0.3-src.orig/libmariadb/CMakeLists.txt
|
||||||
+++ mariadb-connector-c-3.0.2-src/libmariadb/CMakeLists.txt
|
+++ mariadb-connector-c-3.0.3-src/libmariadb/CMakeLists.txt
|
||||||
@@ -400,16 +400,24 @@ IF(CMAKE_SIZEOF_VOID_P EQUAL 8 AND MSVC)
|
@@ -391,16 +391,24 @@ IF(CMAKE_SIZEOF_VOID_P EQUAL 8 AND MSVC)
|
||||||
SET_TARGET_PROPERTIES(mariadbclient PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64")
|
SET_TARGET_PROPERTIES(mariadbclient PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
@ -23,10 +23,10 @@ Index: mariadb-connector-c-3.0.2-src/libmariadb/CMakeLists.txt
|
|||||||
+ENDIF()
|
+ENDIF()
|
||||||
+
|
+
|
||||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||||
IF (NOT WITH_ASAN)
|
IF (NOT WITH_ASAN AND NOT WITH_TSAN)
|
||||||
TARGET_LINK_LIBRARIES (libmariadb "-Wl,--no-undefined")
|
TARGET_LINK_LIBRARIES (libmariadb "-Wl,--no-undefined")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
TARGET_LINK_LIBRARIES (libmariadb "-Wl,--version-script=${CC_BINARY_DIR}/libmariadb/mariadbclient.def")
|
TARGET_LINK_LIBRARIES (libmariadb "${CC_BINARY_DIR}/libmariadb/mariadbclient.def")
|
||||||
+ TARGET_LINK_LIBRARIES (libmariadbprivate "-Wl,--no-undefined")
|
+ TARGET_LINK_LIBRARIES (libmariadbprivate "-Wl,--no-undefined")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
@ -36,8 +36,8 @@ Index: mariadb-connector-c-3.0.2-src/libmariadb/CMakeLists.txt
|
|||||||
+SET_TARGET_PROPERTIES(libmariadbprivate PROPERTIES PREFIX "")
|
+SET_TARGET_PROPERTIES(libmariadbprivate PROPERTIES PREFIX "")
|
||||||
SET_TARGET_PROPERTIES(libmariadb PROPERTIES PREFIX "")
|
SET_TARGET_PROPERTIES(libmariadb PROPERTIES PREFIX "")
|
||||||
|
|
||||||
#
|
SET_TARGET_PROPERTIES(libmariadb PROPERTIES VERSION
|
||||||
@@ -439,6 +447,9 @@ INSTALL(TARGETS mariadbclient
|
@@ -434,6 +442,9 @@ INSTALL(TARGETS mariadbclient
|
||||||
INSTALL(TARGETS libmariadb
|
INSTALL(TARGETS libmariadb
|
||||||
COMPONENT SharedLibraries
|
COMPONENT SharedLibraries
|
||||||
DESTINATION ${INSTALL_LIBDIR})
|
DESTINATION ${INSTALL_LIBDIR})
|
||||||
@ -47,10 +47,10 @@ Index: mariadb-connector-c-3.0.2-src/libmariadb/CMakeLists.txt
|
|||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
# On Windows, install PDB
|
# On Windows, install PDB
|
||||||
Index: mariadb-connector-c-3.0.2-src/mariadb_config/mariadb_config.c.in
|
Index: mariadb-connector-c-3.0.3-src/mariadb_config/mariadb_config.c.in
|
||||||
===================================================================
|
===================================================================
|
||||||
--- mariadb-connector-c-3.0.2-src.orig/mariadb_config/mariadb_config.c.in
|
--- mariadb-connector-c-3.0.3-src.orig/mariadb_config/mariadb_config.c.in
|
||||||
+++ mariadb-connector-c-3.0.2-src/mariadb_config/mariadb_config.c.in
|
+++ mariadb-connector-c-3.0.3-src/mariadb_config/mariadb_config.c.in
|
||||||
@@ -8,6 +8,8 @@ static char *mariadb_progname;
|
@@ -8,6 +8,8 @@ static char *mariadb_progname;
|
||||||
#define INCLUDE "-I@INSTALL_INCLUDEDIR@ -I@INSTALL_INCLUDEDIR@/mariadb"
|
#define INCLUDE "-I@INSTALL_INCLUDEDIR@ -I@INSTALL_INCLUDEDIR@/mariadb"
|
||||||
#define LIBS "-L@INSTALL_LIBDIR@ -lmariadb "\
|
#define LIBS "-L@INSTALL_LIBDIR@ -lmariadb "\
|
||||||
@ -60,29 +60,29 @@ Index: mariadb-connector-c-3.0.2-src/mariadb_config/mariadb_config.c.in
|
|||||||
#define LIBS_SYS "@extra_dynamic_LDFLAGS@"
|
#define LIBS_SYS "@extra_dynamic_LDFLAGS@"
|
||||||
#define CFLAGS INCLUDE
|
#define CFLAGS INCLUDE
|
||||||
#define VERSION "@MARIADB_CLIENT_VERSION@"
|
#define VERSION "@MARIADB_CLIENT_VERSION@"
|
||||||
@@ -27,6 +29,7 @@ static struct option long_options[]=
|
@@ -31,6 +33,7 @@ static struct option long_options[]=
|
||||||
{"version", no_argument, 0, 'f'},
|
{"port", no_argument, 0, 'i'},
|
||||||
{"socket", no_argument, 0, 'g'},
|
{"plugindir", no_argument, 0, 'j'},
|
||||||
{"port", no_argument, 0, 'h'},
|
{"tlsinfo", no_argument, 0, 'k'},
|
||||||
+ {"privatelibs", no_argument, 0, 'i'},
|
+ {"privatelibs", no_argument, 0, 'm'},
|
||||||
{"plugindir", no_argument, 0, 'p'},
|
|
||||||
{"tlsinfo", no_argument, 0, 't'},
|
|
||||||
{NULL, 0, 0, 0}
|
{NULL, 0, 0, 0}
|
||||||
@@ -43,6 +46,7 @@ static const char *values[]=
|
};
|
||||||
VERSION,
|
|
||||||
|
@@ -46,6 +49,7 @@ static const char *values[]=
|
||||||
|
CC_VERSION,
|
||||||
SOCKET,
|
SOCKET,
|
||||||
PORT,
|
PORT,
|
||||||
+ PRIVATE_LIBS,
|
+ PRIVATE_LIBS,
|
||||||
PLUGIN_DIR,
|
PLUGIN_DIR,
|
||||||
TLS_LIBRARY_VERSION
|
TLS_LIBRARY_VERSION
|
||||||
};
|
};
|
||||||
@@ -101,6 +105,9 @@ int main(int argc, char **argv)
|
@@ -116,6 +120,9 @@ int main(int argc, char **argv)
|
||||||
case 'h':
|
case 'l':
|
||||||
puts(PORT);
|
puts(LIBS_SYS);
|
||||||
break;
|
break;
|
||||||
+ case 'i':
|
+ case 'm':
|
||||||
+ puts(PRIVATE_LIBS);
|
+ puts(PRIVATE_LIBS);
|
||||||
+ break;
|
+ break;
|
||||||
case 'p':
|
default:
|
||||||
puts(PLUGIN_DIR);
|
exit((c != -1));
|
||||||
break;
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user