Bug #75177 [Fbk]: Type 'bit' is fetched as unexpected string
| From: | ab@php.net | Date: | Wed, 13 Sep 2017 11:06:19 +0000 |
| Subject: | Bug #75177 [Fbk]: Type 'bit' is fetched as unexpected string | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-211125@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75177&edit=1
ID: 75177
Updated by: ab@php.net
Reported by: david at grudl dot com
Summary: Type 'bit' is fetched as unexpected string
Status: Feedback
Type: Bug
Package: PDO MySQL
Operating System: Windows
PHP Version: 7.2.0RC1
Block user comment: N
Private report: N
New Comment:
I guess this might be related or same as bug #75018.
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2017-09-13 10:29:52] ab@php.net
Do you use a 32-bit build?
Thanks.
------------------------------------------------------------------------
[2017-09-11 03:42:59] laruence@php.net
just for the record, I can not reproduce this on linux.
------------------------------------------------------------------------
[2017-09-08 22:58:29] david at grudl dot com
Description:
------------
MySQL type 'bit' is fetched as unexpected string. Works correctly in PHP < 7.2
Test script:
---------------
<?php
$db = new PDO('mysql:dbname=test', 'root', '123');
$db->query('CREATE TABLE tbl (
bit bit(1)) ENGINE=InnoDB');
$db->query('INSERT INTO tbl (bit) VALUES (1)');
var_dump($db->query('SELECT * FROM tbl')->fetchAll());
Expected result:
----------------
array(1) {
[0]=>
array(2) {
["bit"]=>
string(1) "1"
}
}
Actual result:
--------------
array(1) {
[0]=>
array(2) {
["bit"]=>
string(19) "8220976629027962881"
}
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75177&edit=1