Edit report at https://bugs.php.net/bug.php?id=62273&edit=1

 ID:                 62273
 Updated by:         [email protected]
 Reported by:        andres at phalconphp dot com
 Summary:            Segmentation Fault in Mysqli/Mysqlnd
-Status:             Verified
+Status:             Closed
 Type:               Bug
 Package:            MySQLi related
 Operating System:   Linux/Mac
 PHP Version:        5.3.15-dev/5.3.12/5.4.5-dev
 Assigned To:        mysql
 Block user comment: N
 Private report:     N



Previous Comments:
------------------------------------------------------------------------
[2012-06-29 14:00:29] [email protected]

The fix will come, together with more csets in the next PHP 5.3 release

------------------------------------------------------------------------
[2012-06-29 13:59:02] [email protected]

Automatic comment on behalf of andrey
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=8fe87e7feaab2c031998d553585ba8cabf077499
Log: fix Bug #62273     Segmentation Fault in Mysqli/Mysqlnd

------------------------------------------------------------------------
[2012-06-12 08:09:40] [email protected]

php -r '$link = mysqli_connect("127.0.0.1", "root", "root", 
"test");var_dump(mysqli_character_set_name($link));'
Segmentation fault (core dumped)

------------------------------------------------------------------------
[2012-06-11 23:45:50] andres at phalconphp dot com

hi, is someone assigned to this?

------------------------------------------------------------------------
[2012-06-09 05:56:58] andres at phalconphp dot com

I think the problem is the mysqlnd_charsets variable in 
ext/mysqlnd/mysqlnd_charset.c:

utf8_spanish_ci is returned as code 199 by the mysql/server but in the charset 
const is:

{ 119, UTF8_MB3, UTF8_MB3"_spanish_ci", 1, 3, "", mysqlnd_mbcharlen_utf8mb3, 
check_mb_utf8mb3_valid},

Then mysqlnd_find_charset_nr is unable to find the charset name. And as a 
consequence of that, conn->charset is null producing the segmentation fault.

I'm not sure what is the right solution for this, maybe updating the charset 
code or assigning a default charset when the charset code does not match any.

------------------------------------------------------------------------


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=62273


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62273&edit=1

Reply via email to