Doc #60333 [Fbk->NoF]: fetch_field() length multiplied by 3 in mysqlnd

From: Date: Mon, 18 Feb 2013 00:35:32 +0000
Subject: Doc #60333 [Fbk->NoF]: fetch_field() length multiplied by 3 in mysqlnd
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9545@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: php-bugs@lists.php.net Reported by: danielc at analysisandsolutions dot com Summary: fetch_field() length multiplied by 3 in mysqlnd -Status: Feedback +Status: No Feedback Type: Documentation Problem Package: MySQLi related Operating System: linux PHP Version: 5.4SVN-2011-11-19 (SVN) New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. Previous Comments: ------------------------------------------------------------------------ [2013-01-07 13:04:18] andrey@php.net Hi, during handshake the server states its server charset. mysqlnd uses it, libmysql doesn't. libmysql does use the charset set at build time or some ini setting from my.cnf / my.ini. I suppose your server runs with UTF8 as charset thus mysqlnd uses it as connection charset and so reports 3x values. Is this your case? ------------------------------------------------------------------------ [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? ------------------------------------------------------------------------ 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

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