|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75177 Type 'bit' is fetched as unexpected string
Submitted: 2017-09-08 22:58 UTC Modified: 2017-09-13 11:06 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: david at grudl dot com Assigned:
Status: Closed Package: PDO MySQL
PHP Version: 7.2.0RC1 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: david at grudl dot com
New email:
PHP Version: OS:


 [2017-09-08 22:58 UTC] david at grudl dot com
MySQL type 'bit' is fetched as unexpected string. Works correctly in PHP < 7.2

Test script:

$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) {
  array(2) {
    string(1) "1"

Actual result:
array(1) {
  array(2) {
    string(19) "8220976629027962881"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-11 03:42 UTC]
just for the record, I can not reproduce this on linux.
 [2017-09-13 10:29 UTC]
-Status: Open +Status: Feedback
 [2017-09-13 10:29 UTC]
Do you use a 32-bit build?

 [2017-09-13 11:06 UTC]
I guess this might be related or same as bug #75018.

 [2017-09-13 12:13 UTC]
Automatic comment on behalf of ab
Log: Fixed bug #75018, fixed bug #75177
 [2017-09-13 12:13 UTC]
-Status: Feedback +Status: Closed
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Oct 27 04:03:38 2021 UTC