| Anonymous | Login | Signup for a new account | 2013-05-24 22:51 EDT | ![]() |
| Main | My View | View Issues | Change Log | Roadmap | Wiki | ManTweet | Repositories |
| View Issue Details [ Jump to Notes ] [ Wiki ] | [ Issue History ] [ Print ] | ||||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
| 0014563 | mantisbt | db oracle | public | 2012-08-07 10:42 | 2012-11-27 05:55 | ||||||||
| Reporter | dregad | ||||||||||||
| Assigned To | dregad | ||||||||||||
| Priority | normal | Severity | major | Reproducibility | have not tried | ||||||||
| Status | assigned | Resolution | open | ||||||||||
| Platform | OS | OS Version | |||||||||||
| Product Version | 1.2.12 | ||||||||||||
| Target Version | Fixed in Version | ||||||||||||
| Summary | 0014563: Use of literal SQL statement causes ORA-01704 error when uploading attachments | ||||||||||||
| Description | As reported by CarstenGrohmann in 0013227:0032489: The literal SQL statements are limited to 2000 characters for Oracle. You've to use bind variables in such a case. See "Example 2 Inserting with bind variables" at http://php.net/manual/en/oci8.examples.php. [^] | ||||||||||||
| Additional Information | Error message reported by michalxo in 0013227:0032342: Database query failed. Error received from database was 1704: ORA-01704: string literal too long for the query: INSERT INTO m_bug_file_t (bug_id, title, description, diskfile, filename, folder, filesize, file_type, date_added, content, user_id) VALUES (1, '', '', 'd81bba388aed666c7b91364208276a35', 'mantis_sql.txt', '', 30543, 'text/plain', '1342429120', '435245415445205441424c4520... ...2c20302c203020293b0d0a0d0a0d0a', 1) | ||||||||||||
| Tags | No tags attached. | ||||||||||||
| Attached Files | |||||||||||||
Relationships |
||||||||||||||||
|
||||||||||||||||
Notes |
|
|
dregad (developer) 2012-08-07 10:48 |
The file_add() api function uses obsolete db_query() call instead of db_query_bound(); I will modify the code to call the new function (i.e. using bind variables) which hopefully will avoid the problem. |
|
dregad (developer) 2012-08-07 11:51 edited on: 2012-08-07 12:09 |
Hmmm it may not be as easy as I thought - seems there is an issue with adodb and db_query_bound for uploading the file contents (see attached screenshot), the 1st file is an upload with db_query_bound, while the 2nd is with the current code (db_query); files seem somehow "corrupted" (same test with a png file results in an unreadable image) |
|
dregad (developer) 2012-08-10 10:55 edited on: 2012-08-12 18:58 |
Please test a possible fix for this issue https://github.com/dregad/mantisbt/tree/oracle-fix-14563 [^] and let me know your feedback. Note that I have not performed tests on Oracle myself (only MySQL) as my dev Oracle DB is not operational at the moment. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-08-07 10:42 | dregad | New Issue | |
| 2012-08-07 10:42 | dregad | Status | new => assigned |
| 2012-08-07 10:42 | dregad | Assigned To | => dregad |
| 2012-08-07 10:43 | dregad | Relationship added | child of 0013227 |
| 2012-08-07 10:48 | dregad | Note Added: 0032491 | |
| 2012-08-07 11:50 | dregad | File Added: uploaded-file-db_query-vs-db_query_bound.png | |
| 2012-08-07 11:51 | dregad | Note Added: 0032492 | |
| 2012-08-07 12:09 | dregad | Note Edited: 0032492 | View Revisions |
| 2012-08-10 10:42 | dregad | Relationship added | related to 0012955 |
| 2012-08-10 10:55 | dregad | Note Added: 0032539 | |
| 2012-08-12 18:58 | dregad | Note Edited: 0032539 | View Revisions |
| 2012-11-27 05:55 | dregad | Relationship added | related to 0013099 |
| MantisBT 1.2.16dev master-1.2.x-8c2bd07 [^]
Copyright © 2000 - 2013 MantisBT Team
Time: 0.0856 seconds. memory usage: 2,814 KB |