You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@empire-db.apache.org by "Rainer Döbele (JIRA)" <em...@incubator.apache.org> on 2017/07/17 09:53:00 UTC

[jira] [Resolved] (EMPIREDB-261) DBCommand is not re-usable, when a CLOB colum is involved

     [ https://issues.apache.org/jira/browse/EMPIREDB-261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rainer Döbele resolved EMPIREDB-261.
------------------------------------
       Resolution: Fixed
         Assignee: Rainer Döbele
    Fix Version/s: empire-db-2.4.7

reset of clob reader before use.

> DBCommand is not re-usable, when a CLOB colum is involved
> ---------------------------------------------------------
>
>                 Key: EMPIREDB-261
>                 URL: https://issues.apache.org/jira/browse/EMPIREDB-261
>             Project: Empire-DB
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: empire-db-2.4.6
>            Reporter: jan
>            Assignee: Rainer Döbele
>             Fix For: empire-db-2.4.7
>
>
> When you write code like this:
> cmd.set(DB.col1.to(col1));
> cmd.set(DB.col2.to(col2));
> // ...
> cmd.set(DB.clob_col.to(string));
> // try update
> int updateCount = this.db.executeUpdate(cmd, this.conn);
> if (updateCount < 1) {
>         // not found, insert
>         cmd.set(DB.id.to(id));
>         this.db.executeInsert(cmd, this.conn);
> }
> clob_col will always be empty on the first run, because DBClobData uses a Reader internally, which is consumed on the update-try.
> (Maybe BLOB/DBBlobData has the same issue)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)