View Issue Details

IDProjectCategoryView StatusLast Update
0016336mantisbtdb oraclepublic2014-12-08 00:34
ReporterdregadAssigned Todregad 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version 
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 11:00:54

dregad

Details Diff
Database api: new db_update_blob() function

Issue 0016336
mod - core/database_api.php Diff File

MantisBT: master b36ff709

2013-08-28 11:01:19

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
mod - core/database_api.php Diff File
mod - core/file_api.php Diff File

Issue History

Date Modified Username Field Change
2013-08-28 10:54 dregad New Issue
2013-08-28 10:54 dregad Status new => assigned
2013-08-28 10:54 dregad Assigned To => dregad
2013-08-28 10:55 dregad Relationship added child of 0013227
2013-08-28 10:55 dregad Relationship added related to 0016331
2013-08-28 10:57 dregad Note Added: 0037939
2013-08-28 17:46 dregad Note Added: 0037942
2013-10-17 12:08 dregad Changeset attached => MantisBT master f3552d42
2013-10-17 12:08 dregad Changeset attached => MantisBT master b36ff709
2013-10-17 12:08 dregad Status assigned => resolved
2013-10-17 12:08 dregad Resolution open => fixed
2013-10-17 12:08 dregad Fixed in Version => 1.3.0-beta.1
2013-10-17 12:49 dregad Target Version => 1.3.0-beta.1
2014-04-12 19:39 grangeway Issue cloned: 0017214
2014-12-08 00:34 vboctor Status resolved => closed