Bug #70384 [Com]: mysqli_real_query(): Unknown type 245 sent by the server

From: Date: Wed, 09 Dec 2015 01:47:22 +0000
Subject: Bug #70384 [Com]: mysqli_real_query(): Unknown type 245 sent by the server
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197714@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70384&edit=1 ID: 70384 Comment by: jterry at joeterry dot com Reported by: marc at infomarc dot info Summary: mysqli_real_query(): Unknown type 245 sent by the server Status: Closed Type: Bug Package: MySQLi related Operating System: Linux PHP Version: 7.0.0RC1 Assigned To: mysql Block user comment: N Private report: N New Comment: It looks like the issue is resolved when using the approach given by the OP, however, it's still reproducible in 5.6.16 with the following: $query = mysqli_query($db, $sql); // table contains a JSON field if (false !== $query) { while ($row = mysqli_fetch_array($query) { // do something } } Previous Comments: ------------------------------------------------------------------------ [2015-10-05 14:24:13] lucian dot depold at gmail dot com Problem does not seem to be resolved in 5.6.14 for windows. Newer snapshots are somehow not available. ------------------------------------------------------------------------ [2015-09-30 07:06:55] andrey@php.net Hi Marc, I forgot that. A fix got just pushed to 5.6, 7.0 and 7.1 Thanks! ------------------------------------------------------------------------ [2015-09-29 21:30:20] marc at infomarc dot info Hi Andrey, I believe you also need to register MYSQLI_TYPE_JSON in ext/mysqli/mysqli.c. Marc Delisle ------------------------------------------------------------------------ [2015-09-29 14:02:08] andrey@php.net The fix for this bug has been committed. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Fixed in PHP-5.6, PHP-7.0 and master (PHP-7.1) Thank You for your report ------------------------------------------------------------------------ [2015-08-28 19:22:37] morgan dot tocker at oracle dot com There is a temporary workaround available here. The test case can be modified to cast the JSON type to a CHAR, which is fine from PHP's perspective: select id, CAST(jsoncol as CHAR) from marctable ------------------------------------------------------------------------ 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=70384 -- Edit this bug report at https://bugs.php.net/bug.php?id=70384&edit=1

« previous php.bugs (#197714) next »