{ "id": "106692", "key": "TIMOB-12447", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "15498", "description": "2013 Sprint 12 API", "name": "2013 Sprint 12 API", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "15110", "description": "2013 Sprint 12", "name": "2013 Sprint 12", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-10-18T22:25:23.000+0000", "created": "2012-12-18T14:51:41.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_database", "triage" ], "versions": [], "issuelinks": [ { "id": "25048", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "88820", "key": "AC-3063", "fields": { "summary": "Android: blob image fetching fails", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2013-10-18T22:25:27.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "attachment": [ { "id": "40071", "filename": "flower.jpg", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-20T20:08:16.000+0000", "size": 17766, "mimeType": "image/jpeg" } ], "flagged": false, "summary": "Android: Cannot convert BLOB image to string using SQL", "creator": { "name": "tim_varney", "key": "tim_varney", "displayName": "Tim Varney", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "tim_varney", "key": "tim_varney", "displayName": "Tim Varney", "active": true, "timeZone": "America/New_York" }, "environment": "Titanium 3.0.0 (and 2.1.3), Google APIs Android 2.2", "comment": { "comments": [ { "id": "244643", "author": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "body": "I know that this ticket hasn't been scheduled yet, but don't you think that is an high priority bug?\r\nThere's _no way_ (no workaround whatsoever) to retrieve a BLOB from a sqlite DB in Android.", "updateAuthor": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-03-29T11:49:08.000+0000", "updated": "2013-03-29T11:49:08.000+0000" }, { "id": "257624", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Blob support for read and write added\r\nhttps://github.com/appcelerator/titanium_mobile/pull/4386", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-06-13T15:30:42.000+0000", "updated": "2013-06-13T15:30:42.000+0000" }, { "id": "258644", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~sunila] Please attach the test case with the sqlite file that you used.", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-19T22:04:21.000+0000", "updated": "2013-06-19T22:04:21.000+0000" }, { "id": "258682", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Here is the test case\r\n\r\n1. Run the following:\r\n{code}\r\nvar win1 = Titanium.UI.createWindow({ title: 'Window1' });\r\n\r\nvar imageFile = Titanium.Filesystem.getFile('flower.jpg');\r\nvar oneImage = imageFile.read();\r\n\r\nvar db = Ti.Database.open('mbtiles');\r\n// Initialize the database\r\ndb.execute('CREATE TABLE IF NOT EXISTS images (tile_data BLOB, tile_id TEXT)');\r\ndb.execute('CREATE TABLE IF NOT EXISTS map (zoom_level INTEGER, tile_column INTEGER, tile_row INTEGER, tile_id TEXT)');\r\n\r\ndb.execute(\"DELETE FROM images\");\r\ndb.execute(\"DELETE FROM map\");\r\n\r\ndb.execute(\"INSERT INTO images (tile_id,tile_data) VALUES(?,?)\", 1, oneImage);\r\ndb.execute(\"INSERT INTO map (zoom_level,tile_column,tile_row,tile_id) VALUES(?,?,?,?)\", 1, 1, 1, 1);\r\n\r\nvar rows = db.execute(\"SELECT tile_data FROM images INNER JOIN map ON images.tile_id = map.tile_id\");\r\nvar theImg = null;\r\nwhile (rows.isValidRow()) {\r\n\ttheImg = rows.field(0);\r\n\trows.next();\r\n}\r\nrows.close();\r\ndb.close();\r\n\r\nvar imageView = Titanium.UI.createImageView(\r\n\t\t{\r\n\t\t\timage : theImg,\r\n\t\t\twidth : 480,\r\n\t\t\theight : 640\r\n\t\t});\r\nwin1.add(imageView);\r\nwin1.open();\r\n{code}\r\n\r\nExpected Result:\r\nThe image should load and show up\r\n\r\nActual Result:\r\nOnly the splash screen appears", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-20T02:17:27.000+0000", "updated": "2013-06-20T20:34:45.000+0000" }, { "id": "275746", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified working as expected.\n\nTiSDK 3.2.0.v20131017152001 \nCLI 3.2.0\nTitanium Studio 3.2.0.201310152326\n\nClosing.", "updateAuthor": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-18T21:59:34.000+0000", "updated": "2013-10-18T21:59:34.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }