Bug #66558 [Com]: MYSQL_ATTR_USE_BUFFERED_QUERY = true doesn't work as expected ?

From: Date: Thu, 06 Mar 2014 14:25:25 +0000
Subject: Bug #66558 [Com]: MYSQL_ATTR_USE_BUFFERED_QUERY = true doesn't work as expected ?
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184577@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66558&edit=1 ID: 66558 Comment by: narf at devilix dot net Reported by: netmosfera at email dot it Summary: MYSQL_ATTR_USE_BUFFERED_QUERY = true doesn't work as expected ? Status: Open Type: Bug Package: PDO MySQL PHP Version: 5.5.8 Block user comment: N Private report: N New Comment: Does PDOStatement::rowCount() return the proper number of rows? If so, then everything is fine ... you don't need to bother measuring memory usage. Previous Comments: ------------------------------------------------------------------------ [2014-01-24 08:13:55] netmosfera at email dot it it was told me that it works like it should, but i can't notice the memory incrementing because the memory is handled internally by mysql and not by php. then if it is buffered, why not implementing something like an emulated cursor? something like data_seek() in mysqli? this should probably be closed as invalid, or consider it a feature request thanks ------------------------------------------------------------------------ [2014-01-23 09:25:54] netmosfera at email dot it Description: ------------ Hello, I'm not entirely sure that this is a bug or the expected behavior but seems that MYSQL_ATTR_USE_BUFFERED_QUERY is meant to store the whole recordset in memory, but what it actually seems to do is buffering just the first record of a resultset, while I was expecting it to use about the same memory of fetchAll() It is advertised as "alternative" to fetchAll in http://php.net/pdo_mysql but again what it seems to do is to work exactly like unbuffered queries, except for the fact that the first record is pre-fetched before the first $stmt->fetch() call. So, take a look at it! if this is the expected behavior I think it should be at least documented somehow! Thank you :) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=66558&edit=1

« previous php.bugs (#184577) next »