9.0.5 issue - duplicate rows returned when using SQL_ATTR_ROW_ARRAY_SIZE attribute

Поиск
Список
Период
Сортировка
От John Kew
Тема 9.0.5 issue - duplicate rows returned when using SQL_ATTR_ROW_ARRAY_SIZE attribute
Дата
Msg-id CY1PR0301MB19784F9A1AC0529A01B832ACCCC00@CY1PR0301MB1978.namprd03.prod.outlook.com
обсуждение исходный текст
Ответы Re: 9.0.5 issue - duplicate rows returned when using SQL_ATTR_ROW_ARRAY_SIZE attribute  (John Kew <jkew@tableau.com>)
Список pgsql-odbc


We have been testing the new postgres driver and we found an issue with the SQL_ATTR_ROW_ARRAY_SIZE attribute. We use this attribute to request row sets in chunks with can align with cache boundaries and so-forth; it is a general optimization we use with a number of data sources. With 9.05 though, executing a query which returns a result set > SQL_ATTR_ROW_ARRAY_SIZE will result in the second fetch of rows being duplicates of the first fetch.


So let’s say we set this attribute to 84 (m_rowsToFetch) and use the m_rowStatus array to count the success rows.


SQLSetStmtAttrWhstmt[repeatIndex], SQL_ATTR_ROW_ARRAY_SIZE, (SQLPOINTER)m_rowsToFetchSQL_IS_UINTEGER );

SQLSetStmtAttrhstmt[repeatIndex], SQL_ATTR_ROW_STATUS_PTR, &m_rowStatus[0], 0 );

 

We then create two queries  - the first of which returns 24 rows normally and the second which returns 120 rows. The first query will return the correct results for both 9.03 and 9.05; 24 rows. The second query will perform two fetch operations. For 9.03 the first fetch returns 84 rows and the second 36 rows, correctly totaling 120 rows. For 9.05 we get 84 and 84 on the fetch counts, and it appears the second query has duplicate content.


I believe you could modify one of the bulk* tests to exhibit this behavior; or we can sanitize a small part of our regression suite and release a full repro in code.


-John

В списке pgsql-odbc по дате отправления:

Предыдущее
От: "Inoue, Hiroshi"
Дата:
Сообщение: Re: New 9.5.0100 does not work properly
Следующее
От: John Kew
Дата:
Сообщение: Re: 9.0.5 issue - duplicate rows returned when using SQL_ATTR_ROW_ARRAY_SIZE attribute