Boolean data type support, added in Firebird 3. Fixes #74462. #2522
Conversation
Safe for merging in 7.x branches. |
Hi If this requires the Firebird 3.0 deps, shouldn't it be #ifdef'd out? (Ps I did not read the entire code but your patch) -K |
@KalleZ, I think we should just update FB deps. It is backward compatible. |
@madorin in that case, I'm all for it :) |
@KalleZ is right, that needs to be ifdef'd. The source can be linked with an arbitrary lib, so it needs to be compatible. As well, the test should care about it and skip if necessary. Yet one question - what happens when the new datatype is sent to an older FB server? Were it possible to mitigate such a situation? Thanks. |
The Firebird 3.0 deps are added to the staging series and can be fetched automatically with the new SDK, they're also automatically in use with Appveyor and snaps now. Thanks. |
First, thank's @madorin. Binding work only strings $stmt = $pdo->prepare("SELECT * FROM TBOOL WHERE BVAL = :bool");
//WORK
$stmt->bindValue(":bool", 'true', PDO::PARAM_STR);
$stmt->bindValue(":bool", 'false', PDO::PARAM_STR);
$stmt->bindValue(":bool", 'true', PDO::PARAM_BOOL);
$stmt->bindValue(":bool", 'false', PDO::PARAM_BOOL);
//NOT WORK
$stmt->bindValue(":bool", true, PDO::PARAM_STR);
$stmt->bindValue(":bool", false, PDO::PARAM_STR);
$stmt->bindValue(":bool", true, PDO::PARAM_BOOL);
$stmt->bindValue(":bool", false, PDO::PARAM_BOOL);
$stmt->bindValue(":bool", 1, PDO::PARAM_INT);
$stmt->bindValue(":bool", 0, PDO::PARAM_INT);
$stmt->bindValue(":bool", 1, PDO::PARAM_BOOL);
$stmt->bindValue(":bool", 0, PDO::PARAM_BOOL); |
Hello Edgar, |
What's the current status of this patch ? |
@krakjoe, it is safe to be merged. I saw in meantime also dependencies (php-sdk) on windows have been updated to Firebird 3 and it is also default now on all major Linux distributions. It implements boolean data type for fields, introduced in Firebird3. It still does not fully supports boolean type statement parameters as @edgardmessias pointed, but this is another story. Hope in near future will have some free time to implement also boolean parameters. |
@krakjoe Could you merge this ? |
Nobody merge this ? |
@weltling, can You merge this please? |
@madorin thanks for the ping. It still looks like this part should be guarded. There are lots of LTS distribution users around, fe Jessie. Thanks. |
Oki, yes, for linux distros it make sense to add some ifdefs. i saw for windows platform ibase.h was updated. I'll try to solve it during the weekend. Thanks! |
I've merged this PR as 78f23a6 and added Thanks. |
@weltling , Firebird community really appreciate Your work, and is sending You a big thanks! :) |
@edgardmessias |
More info: https://bugs.php.net/bug.php?id=74462
Note: this require Firebird 3.0 deps