Doc #62798 [Com]: Parameter change in MySQL not reflected in MySQLi

From: Date: Thu, 06 Sep 2012 01:42:30 +0000
Subject: Doc #62798 [Com]: Parameter change in MySQL not reflected in MySQLi
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-8814@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=62798&edit=1 ID: 62798 Comment by: will dot skates at ntlworld dot com Reported by: Danack at basereality dot com Summary: Parameter change in MySQL not reflected in MySQLi Status: Open Type: Documentation Problem Package: MySQLi related Operating System: All PHP Version: Irrelevant Block user comment: N Private report: N New Comment: https://edit.php.net/?project=PHP&perm=en/mysqli-stmt.attr-set.php Previous Comments: ------------------------------------------------------------------------ [2012-08-11 15:42:23] Danack at basereality dot com Description: ------------ --- From manual page: http://www.php.net/mysqli-stmt.attr-set#refsect1-mysqli- stmt.attr-set-parameters --- The current documentation says that "MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH - If set to 1, causes mysqli_stmt_store_result() to update the metadata MYSQL_FIELD- >max_length value." This is a mis-feature caused by the MySQL documentation being incorrect. The field was described as a boolean but was actually being used as a long. This has been fixed in MySQL. http://bugs.mysql.com/bug.php?id=16144 It also appears to be fixed in MySQLi (lots of code surrounded by MYSQL_VERSION_ID >= 50107) however: 1) The documentation has not been updated. 2) Setting any value other than 1 appears to have no effect. I've raised this as a documentation problem as from my reading of the MySQLi code I think the parameter MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH should be setting the maximum field length returned by MySQLi, however that functionality also appears not to be working, so will retest once the documentation reflects the current code. Test script: --------------- Details of how to reproduce are here: http://stackoverflow.com/questions/11913818/php-massive-memory-usage-for-sql-query I can provide a standalone script if required, but as this is a documentation problem first, I haven't yet. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=62798&edit=1

« previous php.doc.bugs (#8814) next »