Doc #60333 [Asn->Ver]: fetch_field() length multiplied by 3 in mysqlnd
| From: | frozenfire@php.net | Date: | Fri, 17 Feb 2012 05:23:07 +0000 |
| Subject: | Doc #60333 [Asn->Ver]: fetch_field() length multiplied by 3 in mysqlnd | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-7959@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60333&edit=1
ID: 60333
Updated by: frozenfire@php.net
Reported by: danielc at analysisandsolutions dot com
Summary: fetch_field() length multiplied by 3 in mysqlnd
-Status: Assigned
+Status: Verified
Type: Documentation Problem
Package: MySQLi related
Operating System: linux
PHP Version: 5.4SVN-2011-11-19 (SVN)
-Assigned To: frozenfire
+Assigned To:
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2012-01-28 01:09:45] danielc at analysisandsolutions dot com
It happens with libmysql under certain circumstances too. I am working to get a straight answer out
of the Johannes and Ulf about a related issue and will post back when that becomes available.
------------------------------------------------------------------------
[2012-01-28 00:29:55] frozenfire@php.net
Does this issue only arise when using mysqlnd?
------------------------------------------------------------------------
[2012-01-23 20:59:51] johannes@php.net
The behavior is correct. We report the same data as we retrieve from the server. The MySQL
documentation has more details on this:
http://dev.mysql.com/doc/refman/5.5/en/c-api-data-structures.html
The key part here is that the data is returned in bytes. On a connection using UTF-8 these are 3
bytes per character.
The PHP documentation should be made more clear on this.
------------------------------------------------------------------------
[2012-01-13 18:09:05] danielc at analysisandsolutions dot com
Can this please be fixed before PHP 5.4 goes out the door?
------------------------------------------------------------------------
[2011-11-21 18:04:38] danielc at analysisandsolutions dot com
That may be the case, but having UTF-8 fields is legit and the answers from libmysql and mysqlnd
should be the same.
------------------------------------------------------------------------
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=60333
--
Edit this bug report at https://bugs.php.net/bug.php?id=60333&edit=1