Bug #71863 [Com]: Segfault when EXPLAIN with "Unknown column" error

From: Date: Fri, 22 Jul 2016 20:26:46 +0000
Subject: Bug #71863 [Com]: Segfault when EXPLAIN with "Unknown column" error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202510@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71863&edit=1 ID: 71863 Comment by: reyad dot attiyat at gmail dot com Reported by: Azq2 at ya dot ru Summary: Segfault when EXPLAIN with "Unknown column" error Status: Assigned Type: Bug Package: MySQLi related Operating System: Ubuntu 14.04 PHP Version: master-Git-2016-03-20 (Git) Assigned To: andrey Block user comment: N Private report: N New Comment: This segfault only happens in PHP 7.1 and not in previous versions of PHP. I understand that mysqlnd only supports the official MySQL implementation, but don't believe we should have a separate driver for MariaDB or other forks (like AWS Aurora). Do you think we should add a quirk/flag to the mysqlnd driver for MariaDB that would handle these errors correctly? Previous Comments: ------------------------------------------------------------------------ [2016-07-22 20:03:56] andrey@php.net MySQL sends an error directly after the query is executed, as it should happen. MariaDB does send OK, meaning that there are fields and sends meta for 10 fields, then EOF (marking end of metadata) and only then it sends an error message. Such sending of errors is not common. It exists when we talk calling stored procedures because they can fail in the middle after some meta is sent. ------------------------------------------------------------------------ [2016-07-19 19:10:20] andrey@php.net I confirm a segfault with MariaDB 10.1.16 . Will have to check how it is incompatible with the MySQL client server protocol. ------------------------------------------------------------------------ [2016-07-19 14:05:08] andrey@php.net MariaDB might be an issue. I don't know. Keep in mind that mysqlnd supports officially only MySQL and not any forks. I will try to get MariaDB up and running to test with it. Best, Andrey ------------------------------------------------------------------------ [2016-07-19 14:01:06] reyad dot attiyat at gmail dot com @andrey I still get this bug on PHP 7.1. However I'm using Windows 10, previously on Windows 7, and am using PHP 7.1.0alpha3 Thread Safe. I downloaded the build from here: http://windows.php.net/qa/. I also just test the non thread safe build and encounter the same problem. I will test on linux to eliminate that as a possible cause. Also I'm using MariaDB and not Oracle's MySQL could this be the reason for segmentation fault? ------------------------------------------------------------------------ [2016-07-19 08:10:27] andrey@php.net I can't reproduce also with the test script from this bug report (in the previous comment I tested with the test script from the Pull Request) ------------------------------------------------------------------------ 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=71863 -- Edit this bug report at https://bugs.php.net/bug.php?id=71863&edit=1

« previous php.bugs (#202510) next »