You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "David McWhorter (JIRA)" <ji...@apache.org> on 2015/10/20 22:36:27 UTC

[jira] [Updated] (HIVE-6712) HS2 JDBC driver is inconsistent w.r.t. auto commit

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

David McWhorter updated HIVE-6712:
----------------------------------
    Attachment: HIVE-6712.patch

This patch changes the behavior of setAutoCommit to allow setAutoCommit(true) to succeed silently and setAutoCommit(false) to throw an exception and fail, as all Hive transactions automatically commit and hive does not yet support manual transactions (see https://cwiki.apache.org/confluence/display/Hive/Hive+Transactions#HiveTransactions-Limitations).

> HS2 JDBC driver is inconsistent w.r.t. auto commit
> --------------------------------------------------
>
>                 Key: HIVE-6712
>                 URL: https://issues.apache.org/jira/browse/HIVE-6712
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 0.13.0
>            Reporter: Xuefu Zhang
>            Assignee: David McWhorter
>         Attachments: HIVE-6712.patch
>
>
> I see an inconsistency in HS2 JDBC driver code:
> {code}
>   @Override
>   public void setAutoCommit(boolean autoCommit) throws SQLException {
>     if (autoCommit) {
>       throw new SQLException("enabling autocommit is not supported");
>     }
>   }
> {code}
> From above, it seems that auto commit is not supported. However, 
> {code}
>   @Override
>   public boolean getAutoCommit() throws SQLException {
>     return true;
>   }
> {code}



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