Doc #62798 [NEW]: Parameter change in MySQL not reflected in MySQLi
| From: | Danack at basereality dot com | Date: | Sat, 11 Aug 2012 15:42:24 +0000 |
| Subject: | Doc #62798 [NEW]: Parameter change in MySQL not reflected in MySQLi | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-8727@lists.php.net to get a copy of this message | ||
From: Danack at basereality dot com
Operating system: All
PHP version: Irrelevant
Package: MySQLi related
Bug Type: Documentation Problem
Bug description:Parameter change in MySQL not reflected in MySQLi
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 bug report at https://bugs.php.net/bug.php?id=62798&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62798&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62798&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62798&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=62798&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62798&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=62798&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=62798&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=62798&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=62798&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=62798&r=support
Expected behavior: https://bugs.php.net/fix.php?id=62798&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=62798&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=62798&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=62798&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62798&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=62798&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=62798&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=62798&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=62798&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=62798&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=62798&r=mysqlcfg