You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Abhay (Jira)" <ji...@apache.org> on 2020/09/23 16:37:00 UTC

[jira] [Commented] (IGNITE-13480) Issue in SQLGetData when deleting binary data

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

Abhay commented on IGNITE-13480:
--------------------------------

This is the message I got from pyodbc team 

https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/sqlgetdata-function?redirectedfrom=MSDN&view=sql-server-ver15#retrieving-variable-length-data-in-parts

"If there is more data to return or not enough buffer was allocated for the terminating character, SQLGetData returns SQL_SUCCESS_WITH_INFO and SQLSTATE 01004 (Data truncated). When it returns the last part of the data, SQLGetData returns SQL_SUCCESS."

If the driver is not returning success with info to indicate there is more data, how would the application know there is more? Definitely a bug in the driver.

> Issue in SQLGetData when deleting binary data 
> ----------------------------------------------
>
>                 Key: IGNITE-13480
>                 URL: https://issues.apache.org/jira/browse/IGNITE-13480
>             Project: Ignite
>          Issue Type: Bug
>          Components: odbc
>    Affects Versions: 2.8.1
>            Reporter: Abhay
>            Priority: Major
>
> When we select a large value in ODBC and column type is varchar then we get the response like this 
> [SQLGetData.c][237][SQLGetData.c][237] Entry: Statement = 0x1bc9d90 Column Number = 1 Target Type = -2 SQL_C_BINARY Buffer Length = 4096 Target Value = 0x1bc1480 StrLen Or Ind = 0x7fffda3c96c0
> [ODBC][722][1600757419.094829][SQLGetData.c][534] Exit:[SQL_SUCCESS]                 Buffer = [BINARYDATA...]                 Strlen Or Ind = 0x7fffda3c96c0 -> 4096
> wherein it sends response as SQL_SUCCESS and strlen_or_ind as our buffer size = 4096 and not SQL_SUCCESS_WITH_INFO and correct size in strlen_or_ind whereas in MS SQL server it shows like this 
>  
> {{[ODBC][2254][1600867369.318414][SQLGetData.c][237]
>         Entry:
>             Statement = 0x1a771d0
>             Column Number = 1
>             Target Type = -2 SQL_C_BINARY
>             Buffer Length = 4096
>             Target Value = 0x1a90d00
>             StrLen Or Ind = 0x7fff0908ece0
> [ODBC][2254][1600867369.318866][SQLGetData.c][545]
>         Exit:[SQL_SUCCESS_WITH_INFO]                
>             Buffer = [BINARYDATA...]                
>             Strlen Or Ind = 0x7fff0908ece0 -> 11936}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)