Home » Database » MDB2 » Bug #3709
quote() translates '' to NULL using portability mode
Details
| Submitted | 2005-03-05 06:38 UTC |
|---|---|
| From | ceefour at gauldong dot net |
| Status | Bogus |
| Package | MDB2 |
| PHP Version | 5.0.3 |
| OS | All |
| Roadmaps | (Not assigned) |
Comments
[2005-03-05 06:38 UTC] ceefour at gauldong dot net
Description:
------------
The latest MDB CVS has another quirk: quote() translates '' to NULL when
EMPTY_TO_NULL portability mode is enabled. This breaks a lot of
applications, as now it is impossible to INSERT an empty string to a NOT
NULL string column. IMHO EMPTY_TO_NULL is only used for retrieving data,
not for quoting input to a query. Therefore, for quoting, empty strings
should be translated to '' no matter what the portability option says.
I understand if Oracle translates '' to NULLs when retrieving data, but I
don't believe that it doesn't accept '' for input.
[2005-03-06 17:05 UTC] smith at backendmedia dot com
This behaviour is intentional. Disable the portability option if you dont require it. I have added a test to the test suite to illustrate the requirement for this test.