[CONJ-70] updating blob with updateBinaryStream Created: 2013-10-10 Updated: 2014-09-17 Resolved: 2014-09-17 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | None |
| Affects Version/s: | 1.1.5 |
| Fix Version/s: | 1.1.8 |
| Type: | Bug | Priority: | Major |
| Reporter: | nzanaga | Assignee: | Massimo Siani (Inactive) |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | blob | ||
| Description |
|
updateBinaryStream is not usable to update BLOB. I don't understand how to update blob to the database |
| Comments |
| Comment by Vladislav Vaintroub [ 2013-10-17 ] |
|
You can update Blob with with Statement.execute(), Statement.executeUpdate(), PreparedStatement.execute(), PreparedStatement.executeUpdate(). You'd need to provide SQL statement like "update table set blob_col=? where id=?". Blobs in MySQL cannot be updated partially, to update a blob, one needs to replace a blob. ResultSets in this driver are readonly, therefore none of the ResultSet.updateXXX() method would work. |
| Comment by Rasmus Johansson (Inactive) [ 2014-09-17 ] |
|
I guess this can be closed as "Not a bug" with the advice Wlad gave above. Do you agree Massimo? |
| Comment by Massimo Siani (Inactive) [ 2014-09-17 ] |
|
Yes, closing. |