You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One solution might be to detect streams in userland (i. e. DBAL), use stream_get_contents or similar and pass the whole data on to DB2. The other approach is to write stream data out to a file and make use of the DB2_PARAM_FILE parameter type (docs) to avoid the memory overhead.
When this issue is fixed, the testInsertProcessesStream and testUpdateProcessesStream tests in \Doctrine\Tests\DBAL\Functional\BlobTest need no longer be skipped.
The text was updated successfully, but these errors were encountered:
mpdude
added a commit
to mpdude/dbal
that referenced
this issue
Sep 13, 2018
According to this article, DB2_PARAM_FILE can work with streams as well. If not, we can store the stream in a temporary file and bind the path to the statement.
While fixing #3217, added tests showed that
DB2Statement
is unable to correctly process streams passed in with theParameterType::LARGE_OBJECT
.Such streams will be cast to strings by the DB2 driver in PHP and finally end up in the database as strings like
Resource id #126
.#3217 fixes this for MySQLi.
A quick scan through https://github.com/php/pecl-database-ibm_db2/blob/master/ibm_db2.c does not show any attempt to support stream handling in DB2.
One solution might be to detect streams in userland (i. e. DBAL), use
stream_get_contents
or similar and pass the whole data on to DB2. The other approach is to write stream data out to a file and make use of theDB2_PARAM_FILE
parameter type (docs) to avoid the memory overhead.When this issue is fixed, the
testInsertProcessesStream
andtestUpdateProcessesStream
tests in\Doctrine\Tests\DBAL\Functional\BlobTest
need no longer be skipped.The text was updated successfully, but these errors were encountered: