Home » Database » MDB2_Driver_mssql » Bug #3912
BLOB AND CLOB limit to 4096 under MSSQL
Details
| Submitted | 2005-03-22 09:10 UTC |
|---|---|
| From | vincent dot dupont at ausy dot be |
| Assigned | quipo |
| Status | Closed |
| Package | MDB2_Driver_mssql |
| PHP Version | 4.3.8 |
| OS | win XP SP2 |
| Roadmaps | (Not assigned) |
Comments
[2005-03-22 09:10 UTC] vincent dot dupont at ausy dot be
Description:
------------
When trying to use the MDB_usage_testcase.php with MSSQL 2000, then following problem occurs :
-The insert of CLOB and BLOB seem to work good, whatever the size of the input data. A MSSQL stored procedure let me get the data back.
-The select of the CLOB and BLOB data only return 4096 chars, never more event if the source data was larger.
The MDB_usage_testcase does always work because it uses a 'small' amount of data for testing. If I increase the data, the same problem occurs.
It seem the problem relies only in selecting information from CLOB and BLOB fields.
In MSSQL. I created the BLOB as VARBINARY and the CLOB as TEXT columns.
Reproduce code:
---------------
Into the testcase, the CLOB and BLOB data is generated by doing a loop on ascii characters like in :
for ($code = 32; $code <= 127; $code++) {
$character_lob['Data'] .= chr($code);
}
So the amount of data is rather 'small'. I increased the amount of data by adding a new loop like :
for($i=0; $i<100; $i++){
for ($code = 32; $code <= 127; $code++) {
$character_lob['Data'] .= chr($code);
}
}
Expected result:
----------------
I need to be able to insert CLOB and BLOB data AND to be able to get it back in PHP (or in a file).
If the operation fails, I need to get an error message.
Actual result:
--------------
if the size of the CLOB is > 4096 chars, only 4096 chars are selected from the database.