[ 
https://issues.apache.org/jira/browse/HIVE-4467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13647026#comment-13647026
 ] 

Carl Steinbach commented on HIVE-4467:
--------------------------------------

I found a more concise explanation here: 
http://www.easysoft.com/developer/interfaces/odbc/diagnostics_error_status_codes.html

{quote}
Virtually all ODBC functions can return two values which indicate success

* SQL_SUCCESS
* SQL_SUCCESS_WITH_INFO

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.
{quote}

                
> HiveConnection does not handle failures correctly
> -------------------------------------------------
>
>                 Key: HIVE-4467
>                 URL: https://issues.apache.org/jira/browse/HIVE-4467
>             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: http://www.atlassian.com/software/jira

Reply via email to