Re: mysqli_fetch_field() mysqlnd & libmysql differences

From: Date: Thu, 19 Jan 2012 19:40:52 +0000
Subject: Re: mysqli_fetch_field() mysqlnd & libmysql differences
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-57432@lists.php.net to get a copy of this message
Am 19.01.2012 20:27, schrieb Daniel Convissor:
Gentlemen: On Thu, Jan 19, 2012 at 02:09:12PM +0100, Ulf Wendel wrote:
Am 19.01.2012 13:50, schrieb Johannes Schlüter:
Your server seems to be configured for UTF-8 by default. In my tests the behavior for both libraries (myslqnd& libmsql) is the same if you mind the character set (use SET NAMES etc.)
Yes, my server is set to UTF-8 in my.cnf: character-set-server = utf8
"MySQLnd always assumes the server default charset. This charset is sent during connection hand-shake/authentication, which mysqlnd will use. Libmysql uses the default charset set in the my.cnf or by an explicit call to mysqli_options() prior to calling mysqli_real_connect(), but after mysqli_init().", http://www.php.net/manual/en/mysqli.construct.php
From the documentation exceprt, above, the test code in
https://bugs.php.net/bug.php?id=60333 should be using the server's default character set under both mysqlnd and libmysql. So shouldn't they both come back with the same answer? Or am I misunderstanding something?
mysqlnd simply does not read MySQL server config. It defaults to actual connection of the server. Ulf

« previous php.internals (#57432) next »