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

From: Date: Wed, 13 Mar 2013 13:40:52 +0000
Subject: Doc #62798 [Opn]: Parameter change in MySQL not reflected in MySQLi
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9655@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 Updated by: uw@php.net 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: Hi, I am not sure whether we need to change the mysqli documentation. The detail makes no difference to the user. Passing 1 oder bool true makes no difference, its casted to boolean internally, if need be. And, from a PHP user perspective there is only one thing you can do: turn on, turn off. libmysql not reacting properly to the setting used to be a known bug that is not present in mysqlnd. There are no memory issues if using mysqlnd. Thus, use mysqlnd, which is the compile time default since 5.4 anyway. Libmysql bugs should be reported at bugs.mysql.com. The php.net bug system is no good place for it. Previous Comments: ------------------------------------------------------------------------ [2012-09-06 01:42:30] will dot skates at ntlworld dot com https://edit.php.net/?project=PHP&perm=en/mysqli-stmt.attr-set.php ------------------------------------------------------------------------ [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 (#9655) next »