[debian-mysql] MySQL in Jessie

Ondřej Surý ondrej at sury.org
Wed Sep 3 10:18:34 UTC 2014


This is the patch I use for ppa:ondrej/php5*

diff --git
a/debian/patches/remove-warning-about-mysql-library-minor-version-mismatch.patch
b/debian/patches/remove-warning-about-mysql-library-minor-version-mismatch.patch
new file mode 100644
index 0000000..8f6b89f
--- /dev/null
+++
b/debian/patches/remove-warning-about-mysql-library-minor-version-mismatch.patch
@@ -0,0 +1,46 @@
+--- php5.5.orig/ext/mysql/php_mysql.c
++++ php5.5/ext/mysql/php_mysql.c
+@@ -735,13 +735,13 @@ static void php_mysql_do_connect(INTERNA
+                      E_DEPRECATED,
+                      "The mysql extension is deprecated and will be
removed in the future: use mysqli or PDO instead");
+ 
+-#if !defined(MYSQL_USE_MYSQLND)
+-      if ((MYSQL_VERSION_ID / 100) != (mysql_get_client_version() /
100)) {
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING,
+-                                              "Headers and client
library minor version mismatch. Headers:%d Library:%ld",
+-                                              MYSQL_VERSION_ID,
mysql_get_client_version());
+-      }
+-#endif
++/* #if !defined(MYSQL_USE_MYSQLND) */
++/*    if ((MYSQL_VERSION_ID / 100) != (mysql_get_client_version() /
100)) { */
++/*            php_error_docref(NULL TSRMLS_CC, E_WARNING, */
++/*                                            "Headers and client
library minor version mismatch. Headers:%d Library:%ld", */
++/*                                            MYSQL_VERSION_ID,
mysql_get_client_version()); */
++/*    } */
++/* #endif */
+ 
+       connect_timeout = MySG(connect_timeout);
+ 
+--- php5.5.orig/ext/mysqli/mysqli_nonapi.c
++++ php5.5/ext/mysqli/mysqli_nonapi.c
+@@ -74,13 +74,13 @@ void mysqli_common_connect(INTERNAL_FUNC
+       zend_bool                       self_alloced = 0;
+ 
+ 
+-#if !defined(MYSQL_USE_MYSQLND)
+-      if ((MYSQL_VERSION_ID / 100) != (mysql_get_client_version() /
100)) {
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING,
+-                                              "Headers and client
library minor version mismatch. Headers:%d Library:%ld",
+-                                              MYSQL_VERSION_ID,
mysql_get_client_version());
+-      }
+-#endif
++/* #if !defined(MYSQL_USE_MYSQLND) */
++/*    if ((MYSQL_VERSION_ID / 100) != (mysql_get_client_version() /
100)) { */
++/*            php_error_docref(NULL TSRMLS_CC, E_WARNING, */
++/*                                            "Headers and client
library minor version mismatch. Headers:%d Library:%ld", */
++/*                                            MYSQL_VERSION_ID,
mysql_get_client_version()); */
++/*    } */
++/* #endif */
+ 
+       if (getThis() && !ZEND_NUM_ARGS() && in_ctor) {
+               php_mysqli_init(INTERNAL_FUNCTION_PARAM_PASSTHRU);


So I guess the answer is yes. Don't ask me why...

Ondrej

On Wed, Sep 3, 2014, at 12:04, Norvald Ryeng wrote:
> ----- ondrej at sury.org wrote:
> 
> > On Mon, Sep 1, 2014, at 12:01, James Page wrote:
> > > Just to be clear, there is no library transition for the 5.5 -> 5.6
> > > upgrade of mysql so I think we are OK timing wise.
> > 
> > JFTR PHP will sort-of-break when compiled with mysql-5.5 and linked with
> > mysql-5.6 spouting warnings about library version mismatch like crazy.
> > (I could patch that out since I am doing that in my PPAs anyway if I am
> > given heads up in time.)
> 
> Thank's for the heads up!
> 
> I'm curious why this happens. Does it call mysql_get_client_version() and
> expect it to always match what it was compiled with? There are only
> compatible ABI changes, so the soname is unchanged.
> 
> Regards,
> 
> Norvald H. Ryeng


-- 
Ondřej Surý <ondrej at sury.org>
Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server



More information about the pkg-mysql-maint mailing list