ODBC SQLFetch fails when column size is bigger than 64K

Bug #1446802 reported by Jieping Zhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Trafodion
Fix Released
Critical
Daniel Lu

Bug Description

SQLFetch returned error "[TRAF][Trafodion ODBC Driver] Cardinality violation; parameter value list does not match column list.Inconsistent memory offsets, data length, and rows fetched" when column size is bigger than 64K

To reproduce the problem, do the fetch below in ODBCTest:
SQLExecDirect:
    In: Statementhandle = 0x000000000020AF40, StatementText = "select left (query_text,8192) from "_REPOS_".metri...", Statementlength = 64
    Return: SQL_SUCCESS=0
SQLFetch:
    In: StatementHandle = 0x000000000020AF40
    Return: SQL_ERROR=-1
    stmt: szSqlState = "21002", *pfNativeError = 0, *pcbErrorMsg = 159, *ColumnNumber = -1, *RowNumber = -2
          MessageText = "[TRAF][Trafodion ODBC Driver] Cardinality violation; parameter value list does not match column list.Inconsistent memory offsets, data length, and rows fetched"
    stmt: szSqlState = "S1000", *pfNativeError = 0, *pcbErrorMsg = 49, *ColumnNumber = -1, *RowNumber = -2
          MessageText = "[TRAF][Trafodion ODBC Driver] Data type mismatch."

Data type of query_text: VARCHAR(50000 CHARS) CHARACTER SET UTF8

Changed in trafodion:
assignee: nobody → Daniel Lu (ping-lu)
Daniel Lu (ping-lu)
Changed in trafodion:
status: New → Fix Committed
Revision history for this message
Daniel Lu (ping-lu) wrote :

this fix corresponding to server side fix "Fix for bug 1438775". without it, client will report "Cardinality violation; parameter value list does not match column list.Inconsistent memory offsets, data length, and rows fetched".

Revision history for this message
Jieping Zhang (jieping-zhang) wrote :

QA test passed.

Test scenario:
Insert 200K long string into a table's varchar(200000) column, fetch the string from the varchar column, string was fetched successfully thru ODBC driver(Linux and Windows drivers).

Changed in trafodion:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.