#35171 [Opn->Csd]: mysqli integet (tinyint and others) problem on 64bit

From: Date: Wed, 09 Nov 2005 13:09:24 +0000
Subject: #35171 [Opn->Csd]: mysqli integet (tinyint and others) problem on 64bit
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-87935@lists.php.net to get a copy of this message
ID: 35171 Updated by: andrey@php.net Reported By: andrey@php.net -Status: Open +Status: Closed Bug Type: MySQLi related Operating System: irrelevant PHP Version: 5.0.5 -Assigned To: +Assigned To: andrey Previous Comments: ------------------------------------------------------------------------ [2005-11-09 14:08:52] andrey@php.net Description: ------------ In 5.0.5 (existant in 5.0.0-5.0.4) was fixed a bug appearing on 64bit architectures when using prepared statements and binding result data. In more details tinyint, year, mediumint, and int(eger) where fetched incorrectly and incorrect data was returned to the script. Use the reproduce code to test your installation. This bug report has been create TO KEEP TRACK of this bug which was fixed without corresponding bug report. For more information see : http://bugs.mysql.com/bug.php?id=14343 Reproduce code: --------------- php -r '$c= new mysqli("localhost","root","secret");$c->query("DROP TABLE IF EXIST test.tint_test;");$c->query("CREATE TABLE test.tint_test (a tinyint(3));");$c->query("INSERT INTO test.tint_test VALUES (123)");$s=$c->stmt_init();$s->prepare("select a from test.tint_test");$s->execute();$s->bind_result($v);$s->fetch();var_dump($v);$c-> query("DROP TABLE EXIST test.tint_test;");' Expected result: ---------------- int(123) Actual result: -------------- int(4357062704804921467) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35171&edit=1

« previous php.bugs (#87935) next »