summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-06-29 10:21:23 +0200
committerRemi Collet <remi@remirepo.net>2018-06-29 10:21:23 +0200
commit10e595140bc7cea2081402afcd409988dad7f67a (patch)
treed950ef3daa0be6a927206640c19865ed340b1845
parentc1d8e4abb3d90e29329793b6ec3d9ca1f40338e2 (diff)
add upstream patch for 7.3
-rw-r--r--PHPINFO9
-rw-r--r--f7fe2b6f7a184c92ff50290f3c2adfd4dcead010.patch94
-rw-r--r--php-pecl-mysql-xdevapi.spec8
3 files changed, 110 insertions, 1 deletions
diff --git a/PHPINFO b/PHPINFO
new file mode 100644
index 0000000..8be431d
--- /dev/null
+++ b/PHPINFO
@@ -0,0 +1,9 @@
+
+mysql_xdevapi
+
+mysql_xdevapi => enabled
+Version => mysql_xdevapi 8.0.11
+Read timeout => 31536000
+Collecting statistics => Yes
+Collecting memory statistics => No
+Tracing => n/a
diff --git a/f7fe2b6f7a184c92ff50290f3c2adfd4dcead010.patch b/f7fe2b6f7a184c92ff50290f3c2adfd4dcead010.patch
new file mode 100644
index 0000000..8485ee1
--- /dev/null
+++ b/f7fe2b6f7a184c92ff50290f3c2adfd4dcead010.patch
@@ -0,0 +1,94 @@
+From f7fe2b6f7a184c92ff50290f3c2adfd4dcead010 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@php.net>
+Date: Fri, 29 Jun 2018 10:10:38 +0200
+Subject: [PATCH] fix some [-Wformat=], [-Werror=format-security] and
+ [-Wformat-extra-args] build warnings
+
+---
+ .gitignore | 1 +
+ messages/mysqlx_resultset__data_row.cc | 5 ++---
+ util/exceptions.cc | 4 ++--
+ xmysqlnd/xmysqlnd_session.cc | 4 ++--
+ xmysqlnd/xmysqlnd_wireprotocol.cc | 2 +-
+ 5 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/messages/mysqlx_resultset__data_row.cc b/messages/mysqlx_resultset__data_row.cc
+index 20cb05e..0d2f660 100644
+--- a/messages/mysqlx_resultset__data_row.cc
++++ b/messages/mysqlx_resultset__data_row.cc
+@@ -318,8 +318,7 @@ MYSQL_XDEVAPI_PHP_METHOD(mysqlx_data_row, decode)
+ (unsigned int) day,
+ (unsigned int) hours,
+ (unsigned int) minutes,
+- (unsigned int) seconds,
+- (unsigned int) useconds));
++ (unsigned int) seconds));
+ #undef DATETIME_FMT_STR
+ break;
+ }
+@@ -360,7 +359,7 @@ MYSQL_XDEVAPI_PHP_METHOD(mysqlx_data_row, decode)
+ break;
+ }
+ if (buf_size == 1) {
+- php_error_docref(nullptr, E_WARNING, "Unexpected value %d for first byte of TIME");
++ php_error_docref(nullptr, E_WARNING, "Unexpected value for first byte of TIME");
+ }
+ const uint8_t scale = buf[0];
+ const uint8_t last_byte = buf[buf_size - 1]; /* last byte is the sign and the last 4 bits, if any */
+diff --git a/util/exceptions.cc b/util/exceptions.cc
+index a611ea2..ed8def7 100644
+--- a/util/exceptions.cc
++++ b/util/exceptions.cc
+@@ -154,7 +154,7 @@ void raise_doc_ref_exception(const doc_ref_exception& e)
+ };
+ const int severity = severity_mapping.at(e.severity);
+ const char* what = e.what();
+- php_error_docref(nullptr, severity, what);
++ php_error_docref(nullptr, severity, "%s", what);
+ }
+ /* }}} */
+
+@@ -179,7 +179,7 @@ void raise_unknown_exception()
+ /* {{{ mysqlx::util::log_warning */
+ void log_warning(const string& msg)
+ {
+- php_error_docref(nullptr, E_WARNING, msg.c_str());
++ php_error_docref(nullptr, E_WARNING, "%s", msg.c_str());
+ }
+ /* }}} */
+
+diff --git a/xmysqlnd/xmysqlnd_session.cc b/xmysqlnd/xmysqlnd_session.cc
+index f9a9fa4..617bb0a 100644
+--- a/xmysqlnd/xmysqlnd_session.cc
++++ b/xmysqlnd/xmysqlnd_session.cc
+@@ -1239,7 +1239,7 @@ XMYSQLND_METHOD(xmysqlnd_session_data, authenticate)(
+ os << "[HY000] Authentication failed using "
+ << boost::join(auth_mech_names, ", ")
+ << ". Check username and password or try a secure connection";
+- php_error_docref(nullptr, E_WARNING, os.str().c_str());
++ php_error_docref(nullptr, E_WARNING, "%s", os.str().c_str());
+ }
+ }
+ }
+@@ -2983,7 +2983,7 @@ XMYSQLND_SESSION_AUTH_DATA * extract_auth_information(const util::Url& node_url)
+ XMYSQLND_SESSION_AUTH_DATA * auth = new XMYSQLND_SESSION_AUTH_DATA;
+
+ if( nullptr == auth ) {
+- php_error_docref(nullptr, E_WARNING, "Coulnd't allocate %u bytes",
++ php_error_docref(nullptr, E_WARNING, "Coulnd't allocate %lu bytes",
+ sizeof(XMYSQLND_SESSION_AUTH_DATA));
+ DBG_RETURN(nullptr);
+ }
+diff --git a/xmysqlnd/xmysqlnd_wireprotocol.cc b/xmysqlnd/xmysqlnd_wireprotocol.cc
+index 0c7bb69..637bfe8 100644
+--- a/xmysqlnd/xmysqlnd_wireprotocol.cc
++++ b/xmysqlnd/xmysqlnd_wireprotocol.cc
+@@ -181,7 +181,7 @@ xmysqlnd_inspect_changed_exec_state(const struct st_xmysqlnd_on_execution_state_
+ case Mysqlx::Notice::SessionStateChanged::ROWS_MATCHED: state_type = EXEC_STATE_ROWS_MATCHED; break;
+ default:
+ DBG_ERR_FMT("Unknown param name %d. Please add it to the switch", message.param());
+- php_error_docref("Unknown param name %d in %s::%d. Please add it to the switch", message.param(), __FILE__, __LINE__);
++ php_error_docref(nullptr, E_WARNING, "Unknown param name %d in %s::%d. Please add it to the switch", message.param(), __FILE__, __LINE__);
+ break;
+ }
+ if (state_type != EXEC_STATE_NONE) {
diff --git a/php-pecl-mysql-xdevapi.spec b/php-pecl-mysql-xdevapi.spec
index 06855db..915936f 100644
--- a/php-pecl-mysql-xdevapi.spec
+++ b/php-pecl-mysql-xdevapi.spec
@@ -28,10 +28,11 @@ Version: 8.0.11
Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
-Group: Development/Languages
URL: http://pecl.php.net/package/%{pecl_name}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
+Patch0: https://github.com/php/pecl-database-mysql_xdevapi/commit/f7fe2b6f7a184c92ff50290f3c2adfd4dcead010.patch
+
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?dtsprefix}gcc-c++
BuildRequires: %{?scl_prefix}php-devel > 7.1
@@ -122,6 +123,8 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
+%patch0 -p1 -b .upstream
+
# Check version as upstream often forget to update this
extver=$(sed -n '/#define PHP_MYSQL_XDEVAPI_VERSION/{s/.* "//;s/".*$//;p}' php_mysql_xdevapi.h)
if test "x${extver}" != "x%{version}%{?prever}%{?gh_date:-dev}"; then
@@ -309,6 +312,9 @@ fi
%changelog
+* Fri Jun 29 2018 Remi Collet <remi@remirepo.net> - 8.0.11-2
+- add upstream patch for 7.3
+
* Fri Apr 20 2018 Remi Collet <remi@remirepo.net> - 8.0.11-1
- update to 8.0.11 (stable)