php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52082 character_set_client & character_set_connection reset after mysqli_change_user
Submitted: 2010-06-14 18:28 UTC Modified: 2010-07-06 13:03 UTC
From: andrey@php.net Assigned: mysql
Status: Closed Package: MySQLi related
PHP Version: 5.3SVN-2010-06-14 (SVN) OS: All
Private report: No CVE-ID:
 [2010-06-14 18:28 UTC] andrey@php.net
Description:
------------
After calling mysqli_change_user() character_set_client and character_set_result are reset to the server defaults. If the client has set a different one with mysqli_options() or mysqli_set_character_set() it will be lost.
The MySQL server supports from version 5.1.23 setting of a charset during COM_CHANGE_USER, an extension in the protocol. Older versions doesn't support it and need explicit call to mysql_set_character_set().

Expected result:
----------------
Keep the old character_set_client/connection.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-14 18:28 UTC] andrey@php.net
-Status: Open +Status: Verified -Assigned To: +Assigned To: mysql
 [2010-06-14 19:16 UTC] andrey@php.net
Automatic comment from SVN on behalf of andrey
Revision: http://svn.php.net/viewvc/?view=revision&revision=300435
Log: Fixed bug #52082 (character_set_client & character_set_connection reset after
mysqli_change_user())

libmysql >= 5.1.23 will PASS, older library versions will fail
 [2010-07-06 13:03 UTC] andrey@php.net
-Status: Verified +Status: Closed
 [2010-07-06 13:03 UTC] andrey@php.net
Already fixed and reported in NEWS. Closing.
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 16 13:02:46 2014 UTC