Re: [PATCH] Fix FetchRefcursors issues

Поиск
Список
Период
Сортировка
От Adrian Grucza
Тема Re: [PATCH] Fix FetchRefcursors issues
Дата
Msg-id CADF4wWqd4a=rRD27a2umxq0EFFog160d0fJrTxrS=74O7hQMRg@mail.gmail.com
обсуждение исходный текст
Ответ на [PATCH] Fix FetchRefcursors issues  (Adrian Grucza <adrian.grucza@iress.com>)
Список pgsql-odbc
Hi all,

I've attached an additional patch that fixes a pre-existing bug where cursors were being freed prematurely when there are multiple results that use cursors. It can happen when the fetch cache size is smaller than the number of rows being fetched. To ensure the bug doesn't resurface, the patch includes updates to the test that was modified in my previous patch (Fix-FetchRefcursors-issues.patch).

Some details about this patch:

The patch adds a condition to skip existing code that closes all subsequent cursors when the current one gets closed. It does not seem logical that closing one cursor should cause others to also be closed. The code was originally added in commit c07342d22d82ea6293d27057840babfc2ff6d750 to fix a crash when using SQL Server linked servers, but it's still not clear exactly why it was needed, because the change that prevents a crash seems to be in a different file (parse.c).

I was tempted to remove the code completely because there are no tests that rely on its existence, but that may be because testing it would have required integration with SQL Server. So I've assumed that the code is only required for SQL Server, and therefore made it run only for SQL Server.

Regards,
iress.com
Adrian Grucza  
Technical Lead
Tel: +61390185800
adrian.grucza@iress.com
www.iress.com
Level 16 385 Bourke St
 Melbourne, Victoria, 3000
The contents of this email originated from Iress. For this purpose Iress includes Iress Limited and/or any of its subsidiaries, holding companies and trading entities. ​If you have received this email in error please notify the sender immediately and delete this email. 
nosig
Вложения

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

Предыдущее
От: Venkata Reddy BIJJAM
Дата:
Сообщение: Re: ODBC to Postgres SQL (Aws rds) Connectivity Issue
Следующее
От: Dirk Hasenbrink
Дата:
Сообщение: Bug in psqlodbc 13.02? Bulk updates + ODBC function SQLRowCount(...)