Bug #75177 [Fbk->Csd]: Type 'bit' is fetched as unexpected string

From: Date: Wed, 13 Sep 2017 12:13:22 +0000
Subject: Bug #75177 [Fbk->Csd]: Type 'bit' is fetched as unexpected string
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211127@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
+Status:             Closed
 Type:               Bug
 Package:            PDO MySQL
 Operating System:   Windows
 PHP Version:        7.2.0RC1
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=3d93856c4a05394196c5610ae11cf019d1e18f76
Log: Fixed bug #75018, fixed bug #75177


Previous Comments:
------------------------------------------------------------------------
[2017-09-13 11:06:17] ab@php.net

I guess this might be related or same as bug #75018.

Thanks.

------------------------------------------------------------------------
[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


Thread (5 messages)

« previous php.bugs (#211127) next »