You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Kylin Soong (JIRA)" <ji...@apache.org> on 2015/08/13 04:24:45 UTC

[jira] [Updated] (PHOENIX-2176) JDBC AutoCommit is true, but can not AutoCommit the UPSERT

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

Kylin Soong updated PHOENIX-2176:
---------------------------------
    Fix Version/s: 4.5.0

> JDBC AutoCommit is true, but can not AutoCommit the UPSERT
> ----------------------------------------------------------
>
>                 Key: PHOENIX-2176
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2176
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.2.1
>         Environment: - Phoenix 4.2.1
> - hbase-0.98.8-hadoop2
>            Reporter: Kylin Soong
>             Fix For: 4.5.0
>
>
> Create TABLE DDL as below
> {code}
> CREATE TABLE IF NOT EXISTS \"smalla5\"(\"ROW_ID\" INTEGER PRIMARY KEY, \"cf5\".\"city\" VARCHAR)
> {code}
> Execute code
> {code}
> ...
> Connection conn = ...
> boolean isAutoCommit = conn.getAutoCommit();
> System.out.println(isAutoCommit);
> {code}
> the output is 'true', this hint the AutoCommit is enabled, but the UPSERT not save to table, for example, continue execute
> {code}
> execute(conn, "UPSERT INTO  \"smalla5\" VALUES(6, '66')", false);
> execute(conn, "SELECT * FROM \"smalla5\"", false);
> close(conn);
> {code}
> the query result is empty.
> If set AutoCommit to false, then commit manually then the UPSERT save to Table,for example
> {code}
> conn.setAutoCommit(false);
> execute(conn, "UPSERT INTO  \"smalla5\" VALUES(5, '5')", false);
> conn.commit();
> conn.setAutoCommit(isAutoCommit);
> execute(conn, "SELECT * FROM \"smalla5\"", false);
> close(conn);
> {code}
> Does this should be a bug?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)