Jira issue originally created by user @doctrinebot:
This issue is created automatically through a Github pull request on behalf of deeky666:
This PR is a first approach towards officially supporting IBM DB2 platform in DBAL. The current implementation of the platform and schema manager are very outdated, buggy and incomplete. There is no platform test case yet and running the general DBAL test suite shows a lot of errors.
The focus of this PR is to bring back the DB2 platform and schema manager into sync mit the abstract classes so that at least the test suite runs. Furthermore this PR adds a platform test case. Along with achieving this, a lot of bugs needed to be fixed. The following changes have been made:
The complete test suite now runs fine on ibm_db2 driver except for TypeConversionTest::testIdempotentDataConversion:
There was 1 failure:
1) Doctrine\Tests\DBAL\Functional\TypeConversionTest::testIdempotentDataConversion with data set #13 ('decimal', 1.55, 'string')
Conversion between values should produce the same out as in value, but doesnt!
Failed asserting that '1,55' matches expected 1.55.
I have tried to find a solution for this issue but apparently this is a driver issue as the decimal separator seems to depend on the system's locale settings. Unfortunately there is no driver option where we could set the desired decimal separator. For now it seems we have to live with it and I guess it works on english locale systems.
The pdo_ibm driver reveals more problems as it is still buggy (for years now). The driver still segfaults on decoding CLOB/BLOB resources. So every test that uses BLOBs in any way does not run. The second issue I encountered was a test where a table is referenced quoted in a SELECT statement:
There was 1 error:
Doctrine\DBAL\DBALException: An exception occurred while executing 'SELECT test*int, test_string FROM "fetch_table" WHERE test_int = '1' AND test*string = 'foo'':
SQLSTATE[42S02]: Base table or view not found: -204 [IBM][CLI Driver][DB2/LINUXX8664] SQL0204N "DB2INST1.fetch_table" is an undefined name. SQLSTATE=42704
(SQLNumResultCols[-204] at /home/deeky/db2/PDO*IBM-1.3.3/ibm*driver.c:153)
This is weird and I couldn't find out why this does not work on pdo*ibm but works on ibm*db2.
Besides those issues pdo_ibm runs fine.
This PR does not make the IBM DB2 implementation perfect yet but it is a good start which is already usable. If we decide on officially supporting this vendor, I would do further work on this.
Comment created by @doctrinebot:
A related Github Pull-Request [GH-447] was closed:
Issue was closed with resolution "Fixed"