]> granicus.if.org Git - php/commit
Fix for bug #71863 Segfault when EXPLAIN with "Unknown column" error
authorAndrey Hristov <andrey@php.net>
Fri, 22 Jul 2016 21:26:26 +0000 (00:26 +0300)
committerNikita Popov <nikic@php.net>
Mon, 25 Jul 2016 19:59:27 +0000 (21:59 +0200)
commitb27ff62ee0a40b3784cc032f2431e974a77b28c2
tree5f31be09165b8ba582a0f999c9f683121647df33
parentac0bbea3a89334b47995315cd37ca342e89486f2
Fix for bug #71863 Segfault when EXPLAIN with "Unknown column" error

The reason was that after the big refactoring of mysqlnd at the end of
last year code that is initializing the error_info structure in the
result set was not added. It existed already for connections and PS.
The code that segfaults is hit only with MariaDB because MariaDB sends
full metadata about the EXPLAIN query + EOF packet and only then it sends
an error packet. MySQL doesn't do that but sends directly an error which
is caught (by different code path). As errors during execution (which means
after sending meta) are pretty rare there was no test case of MySQL to
catch it.
NEWS
ext/mysqli/tests/bug71863.phpt [new file with mode: 0644]
ext/mysqlnd/mysqlnd_connection.c
ext/mysqlnd/mysqlnd_result.c