hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carl Steinbach (JIRA)" <>
Subject [jira] [Commented] (HIVE-4467) HiveConnection does not handle failures correctly
Date Wed, 01 May 2013 22:50:16 GMT


Carl Steinbach commented on HIVE-4467:

I found a more concise explanation here:

Virtually all ODBC functions can return two values which indicate success


Both of these returns cause the SQL_SUCCEEDED macro to result in 1.

If a function returns SQL_SUCCESS_WITH_INFO it means that the call succeeded but an informational
message was produced.

e.g. with some drivers you might set the cursor type, prepare a statement and then execute
it. When SQLExecute is called the statement is acted upon but the driver might change the
cursor type to something else. In this case, SQLExecute would return SQL_SUCCESS_WITH_INFO
and the driver would add a diagnostic indicating the cursor type had been changed.

You should note that a few ODBC functions return a status which fails the SQL_SUCCEEDED macro
but do not indicate an error as such.

e.g. SQLFetch can return SQL_NO_DATA indicating there is no further rows in the result set,
this is not necessarily an error.

> HiveConnection does not handle failures correctly
> -------------------------------------------------
>                 Key: HIVE-4467
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2, JDBC
>    Affects Versions: 0.11.0, 0.12.0
>            Reporter: Thiruvel Thirumoolan
>            Assignee: Thiruvel Thirumoolan
>             Fix For: 0.11.0, 0.12.0
>         Attachments: HIVE-4467.patch
> HiveConnection uses Utils.verifySuccess* routines to check if there is any error from
the server side. This is not handled well. In Utils.verifySuccess() when withInfo is 'false',
the condition evaluates to 'false' and no SQLexception is thrown even though there could be
a problem on the server.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message