View Issue Details

IDProjectCategoryView StatusLast Update
0016336mantisbtdb oraclepublic2014-12-08 00:34
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Target Version1.3.0-beta.1Fixed in Version1.3.0-beta.1 
Summary0016336: File attachment to DB fails when file bigger than 4000 bytes on Oracle
Description

When trying to upload a file bigger than 4000 bytes while storing attachments in the DB, Oracle throws error

ORA-01461: can bind a LONG value only for insert into a LONG column for the query

TagsNo tags attached.

Relationships

related to 0016331 closeddregad Attaching file causes ORA-01400: cannot insert NULL into BLOB column 
child of 0013227 closeddregad Oracle DB support multiple issues 

Activities

dregad

dregad

2013-08-28 10:57

developer   ~0037939

Oracle requires special handling for BLOB data. Insertion "in-line" is limited to 2000 bytes, and with bind variable it is only possible when data is < 4000 bytes.

dregad

dregad

2013-08-28 17:46

developer   ~0037942

With the commits I pushed today, the Oracle branch [1] should now properly support db-stored attachments.

See 0016331 for similar fix for disk-stored attachments.

[1] https://github.com/dregad/mantisbt/tree/oracle

Related Changesets

MantisBT: master f3552d42

2013-08-28 07:00

dregad


Details Diff
Database api: new db_update_blob() function

Issue 0016336
Affected Issues
0016336
mod - core/database_api.php Diff File

MantisBT: master b36ff709

2013-08-28 07:01

dregad


Details Diff
Oracle: properly store file attachments as BLOBs

Uses new db_update_blob() function, instead of relying on hex-encoding
the binary data and passing the resulting string to db_query_bound()
because this method limits the size of attachments to 4000 bytes.

Fixes 0016336

Porting to 1.3 - Conflicts:
core/file_api.php
Affected Issues
0016336
mod - core/database_api.php Diff File
mod - core/file_api.php Diff File