empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Döbele (JIRA) <empire-db-...@incubator.apache.org>
Subject [jira] [Resolved] (EMPIREDB-261) DBCommand is not re-usable, when a CLOB colum is involved
Date Mon, 17 Jul 2017 09:53:00 GMT

     [ 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)

Mime
View raw message