Bug #78179 [Com]: MariaDB 10.3 broke mysqli::begin_transaction()

From: Date: Thu, 08 Aug 2019 13:36:53 +0000
Subject: Bug #78179 [Com]: MariaDB 10.3 broke mysqli::begin_transaction()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-222140@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78179&edit=1 ID: 78179 Comment by: david dot bergeron5 at usherbrooke dot ca Reported by: david dot bergeron5 at usherbrooke dot ca Summary: MariaDB 10.3 broke mysqli::begin_transaction() Status: Wont fix Type: Bug Package: MySQLi related Operating System: Debian 9 PHP Version: Irrelevant Assigned To: cmb Block user comment: N Private report: N New Comment: A little bit harsh but I understand. My only question than is why is mysqlnd is not doing what We ask it to do, not using transaction if MariaDB support it at version 10.3 ? From what I can know of the protocol there is nothing in the protocol that say check the version number before doing a LOCK. Not that I am a fan of MariaDB to change the versioning schema, but there probably should be a other way in MySQL and MariaDB to find what features is available in the current server. Previous Comments: ------------------------------------------------------------------------ [2019-08-08 13:27:53] andrey@php.net mysqlnd implements the MySQL Client/Server protocol. If MariaDB doesn't follow the reference implementation then this is a problem of MariaDB, not of mysqlnd. I am going to revert this patch. ------------------------------------------------------------------------ [2019-08-02 14:46:45] cmb@php.net Automatic comment on behalf of cmbecker69@gmx.de Revision: http://git.php.net/?p=php-src.git;a=commit;h=f9f4a68368406a2ba2bd9fab0494261090183e8e Log: Fix #78179: MariaDB server version incorrectly detected ------------------------------------------------------------------------ [2019-07-24 13:35:36] cmb@php.net The following pull request has been associated: Patch Name: Fix #78179: MariaDB server version incorrectly detected On GitHub: https://github.com/php/php-src/pull/4472 Patch: https://github.com/php/php-src/pull/4472.patch ------------------------------------------------------------------------ [2019-07-24 12:03:11] cmb@php.net Server version: 10.1.38-MariaDB-0+deb9u1 Debian 9.8 var_dump($mysqli->server_version); // int(50505) This also causes 8 test to fail. ------------------------------------------------------------------------ [2019-07-21 17:43:34] requinix@php.net What does mysqli_get_server_version($mysqli) or $mysqli->server_version return? 50505 I assume? And this has been the case since MariaDB 10.0, right? It's not new? Because, to fill in the blanks that @duckwebdev saw, MariaDB returns a half-hardcoded version number (string) like "5.5.5-10.5.0". Which is a nuisance - it should be faking the corresponding MySQL version, not a fixed 5.5.5. Which is to say nothing about how hacky this was to fix the original problem. Sigh. https://github.com/MariaDB/server/blob/826f9d4f7e99973cafe7654697d7c50b8b64b76b/include/mysql_com.h#L41 PHP could detect the magic "5.5.5-" string as their client does, but the truth is that since 10.0 their versioning scheme is incompatible with MySQL's. Like how 10.0 is based on the 5.6 series and so does not support 5.7 (or future) features, even though 10.0 >= 5.7. Which means to get it absolutely right PHP would need different version number checks; for example, transactions' READ WRITE/READ ONLY requires MySQL 5.6.5, which presumably will be somewhere (I can't find where) in the MariaDB 10.0 *and* 10.1 series. Double sigh. ...why couldn't they have done it properly like Percona... Or... we could sweep the issue under the rug and remove version checks for older stuff - after all 5.6.5 was released April 2012, which is back in the PHP 5.3 era. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=78179 -- Edit this bug report at https://bugs.php.net/bug.php?id=78179&edit=1

« previous php.bugs (#222140) next »