Uh oh!
There was an error while loading. Please reload this page.
Fix #106: preserve nullable bit when setting SQL_TEXT in _php_ibase_b… - #110
Fix #106: preserve nullable bit when setting SQL_TEXT in _php_ibase_b…#110MartinKoeditz wants to merge 1 commit into
Conversation
…ind() The fallthrough path in _php_ibase_bind() unconditionally set sqltype to SQL_TEXT, discarding the nullable bit (bit 0). This caused subsequent ibase_execute() calls with NULL to be ignored for nullable columns that went through this path. Fix: use SQL_TEXT | (var->sqltype & 1) to preserve the nullable flag. Adds test: tests/issue106_001.phpt
mlazdans
commented
Apr 15, 2026
Hi! Thanks! Most of issues tagged assigned to me has been already fixed. I have to sit down and commit them here yet :) I will check your code too. |
mlazdans
commented
Apr 15, 2026
Test case will be useful 👍 |
MartinKoeditz
commented
Apr 24, 2026
If it's ok for you then we should merge it. Test case is available and IMHO correct. |
mlazdans
commented
Apr 27, 2026
This is fixed already in my local branch. I will merge test case once I push. Currently a bit busy on other projects :| |
mlazdans
commented
May 4, 2026
Did you run this test case with non-fixed version? |
MartinKoeditz
commented
May 4, 2026
Not yet. |
mlazdans
commented
May 4, 2026
So basically this test did not trigger the error for me. I did some tests on my own (tests/nulls_001.phpt, tests/nulls_002.phpt) and I don't remember now if they triggered the error. Most likely one of them did. However, I caught this issue when importing CSV file lots of fields and with prepare/execute after couple of rows. It feels like one or few queries are not enough. |
…ind()
The fallthrough path in _php_ibase_bind() unconditionally set sqltype to SQL_TEXT, discarding the nullable bit (bit 0). This caused subsequent ibase_execute() calls with NULL to be ignored for nullable columns that went through this path.
Fix: use SQL_TEXT | (var->sqltype & 1) to preserve the nullable flag.
Adds test: tests/issue106_001.phpt