Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78179: MariaDB server version incorrectly detected
This commit is contained in:
Christoph M. Becker 2019-08-02 16:45:08 +02:00
commit e60c507362
2 changed files with 9 additions and 0 deletions

1
NEWS
View File

@ -22,6 +22,7 @@ PHP NEWS
Jung)
- MySQLnd:
. Fixed bug #78179 (MariaDB server version incorrectly detected). (cmb)
. Fixed bug #78213 (Empty row pocket). (cmb)
- Opcache:

View File

@ -1436,6 +1436,14 @@ MYSQLND_METHOD(mysqlnd_conn_data, get_server_version)(const MYSQLND_CONN_DATA *
return 0;
}
#define MARIA_DB_VERSION_HACK_PREFIX "5.5.5-"
if (conn->server_capabilities & CLIENT_PLUGIN_AUTH
&& !strncmp(p, MARIA_DB_VERSION_HACK_PREFIX, sizeof(MARIA_DB_VERSION_HACK_PREFIX)-1))
{
p += sizeof(MARIA_DB_VERSION_HACK_PREFIX)-1;
}
major = ZEND_STRTOL(p, &p, 10);
p += 1; /* consume the dot */
minor = ZEND_STRTOL(p, &p, 10);