Bug #74462 [NEW]: PDO_Firebird returns only NULLs for results with boolean for FIREBIRD >= 3.0
| From: | edgardmessias at gmail dot com | Date: | Mon, 17 Apr 2017 19:14:12 +0000 |
| Subject: | Bug #74462 [NEW]: PDO_Firebird returns only NULLs for results with boolean for FIREBIRD >= 3.0 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-208627@lists.php.net to get a copy of this message | ||
From: edgardmessias at gmail dot com
Operating system: All
PHP version: 7.0.18
Package: PDO Firebird
Bug Type: Bug
Bug description:PDO_Firebird returns only NULLs for results with boolean for FIREBIRD >= 3.0
Description:
------------
From the version of FIREBIRD 3.0.0, Boolean type support was introduced
(https://www.firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-ddl-enhance.html#rnfb30-ddl-boolean)
Currently, the PDO returns only null values for Boolean columns
Test script:
---------------
CREATE TABLE TBOOL (ID INT, BVAL BOOLEAN);
COMMIT;
INSERT INTO TBOOL VALUES (1, TRUE);
INSERT INTO TBOOL VALUES (2, 2 = 4);
INSERT INTO TBOOL VALUES (3, NULL = 1);
COMMIT;
<php
$pdo = new \PDO('firebird:dbname=localhost:/tmp/TEST.FDB', 'SYSDBA',
'masterkey', array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_CASE => PDO::CASE_LOWER,
));
$stmt = $pdo->prepare("SELECT * FROM TBOOL");
$stmt->execute();
$rows = $stmt->fetchAll();
var_dump($rows);
Expected result:
----------------
ID BVAL
============ =======
1 <true>
2 <false>
3 <null>
Actual result:
--------------
ID BVAL
============ =======
1 <null>
2 <null>
3 <null>
--
Edit bug report at https://bugs.php.net/bug.php?id=74462&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74462&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74462&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74462&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74462&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74462&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74462&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74462&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74462&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74462&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74462&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74462&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74462&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74462&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74462&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74462&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74462&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74462&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74462&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74462&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74462&r=mysqlcfg