From 51d8ac07174840b76781794d310cca80c1484e77 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Wed, 14 Aug 2024 07:58:01 +1000 Subject: [PATCH] Rebase against eef229cc1eb77c3236ab4e210a6a276b65173e39. Fixes regression with latest odbc32. --- ...dles-when-requesting-information-of-.patch | 45 ------------------- ...-statment-when-creating-a-descriptor.patch | 25 +++++++++++ ...Propgate-win32_funcs-to-all-children.patch | 29 ++++++++++++ staging/upstream-commit | 2 +- 4 files changed, 55 insertions(+), 46 deletions(-) delete mode 100644 patches/odbc32-fixes/0010-odbc32-Store-handles-when-requesting-information-of-.patch create mode 100644 patches/odbc32-fixes/0018-odbc32-Pass-statment-when-creating-a-descriptor.patch create mode 100644 patches/odbc32-fixes/0019-odbc32-Propgate-win32_funcs-to-all-children.patch diff --git a/patches/odbc32-fixes/0010-odbc32-Store-handles-when-requesting-information-of-.patch b/patches/odbc32-fixes/0010-odbc32-Store-handles-when-requesting-information-of-.patch deleted file mode 100644 index 056301b9..00000000 --- a/patches/odbc32-fixes/0010-odbc32-Store-handles-when-requesting-information-of-.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 53c9ccb1d5008cf348268e6a053ff6414bc4773e Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Wed, 10 Jul 2024 15:17:00 +1000 -Subject: [PATCH] odbc32: Store handles when requesting information of Columns. - ---- - dlls/odbc32/proxyodbc.c | 22 +++++++++++++++++++++- - 1 file changed, 21 insertions(+), 1 deletion(-) - -diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c -index 632738b9533..ca598e404b1 100644 ---- a/dlls/odbc32/proxyodbc.c -+++ b/dlls/odbc32/proxyodbc.c -@@ -6315,7 +6315,27 @@ SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, - } - else if (stmt->hdr.win32_handle) - { -- ret = get_stmt_attr_win32_w( stmt, Attribute, Value, BufferLength, StringLength ); -+ switch(Attribute) -+ { -+ case SQL_ATTR_APP_ROW_DESC: -+ case SQL_ATTR_IMP_ROW_DESC: -+ case SQL_ATTR_APP_PARAM_DESC: -+ case SQL_ATTR_IMP_PARAM_DESC: -+ { -+ struct descriptor *desc; -+ if ((desc = create_descriptor( stmt ))) -+ { -+ ret = stmt->hdr.win32_funcs->SQLGetStmtAttrW( stmt->hdr.win32_handle, Attribute, -+ &desc->hdr.win32_handle, -+ BufferLength, StringLength); -+ desc->hdr.win32_funcs = stmt->hdr.win32_funcs; -+ *((SQLHDESC*)Value) = desc; -+ } -+ break; -+ } -+ default: -+ ret = get_stmt_attr_win32_w( stmt, Attribute, Value, BufferLength, StringLength ); -+ } - } - - TRACE("Returning %d\n", ret); --- -2.43.0 - diff --git a/patches/odbc32-fixes/0018-odbc32-Pass-statment-when-creating-a-descriptor.patch b/patches/odbc32-fixes/0018-odbc32-Pass-statment-when-creating-a-descriptor.patch new file mode 100644 index 00000000..61bff1e1 --- /dev/null +++ b/patches/odbc32-fixes/0018-odbc32-Pass-statment-when-creating-a-descriptor.patch @@ -0,0 +1,25 @@ +From daff4a3d283837c83f33bcc0141af4078e6251ac Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Wed, 14 Aug 2024 07:52:10 +1000 +Subject: [PATCH] odbc32: Pass statment when creating a descriptor + +--- + dlls/odbc32/proxyodbc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c +index c12910161ab..2e55e1ee06e 100644 +--- a/dlls/odbc32/proxyodbc.c ++++ b/dlls/odbc32/proxyodbc.c +@@ -547,7 +547,7 @@ static SQLRETURN alloc_descriptors( struct statement *stmt ) + unsigned int i; + for (i = 0; i < ARRAY_SIZE(stmt->desc); i++) + { +- if (!(stmt->desc[i] = create_descriptor( NULL ))) ++ if (!(stmt->desc[i] = create_descriptor( stmt ))) + { + free_descriptors( stmt ); + return SQL_ERROR; +-- +2.43.0 + diff --git a/patches/odbc32-fixes/0019-odbc32-Propgate-win32_funcs-to-all-children.patch b/patches/odbc32-fixes/0019-odbc32-Propgate-win32_funcs-to-all-children.patch new file mode 100644 index 00000000..87facce0 --- /dev/null +++ b/patches/odbc32-fixes/0019-odbc32-Propgate-win32_funcs-to-all-children.patch @@ -0,0 +1,29 @@ +From 9b5c4a85620c6f86a368d420221199da2f794c63 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Wed, 14 Aug 2024 07:51:18 +1000 +Subject: [PATCH] odbc32: Propgate win32_funcs to all children + +--- + dlls/odbc32/proxyodbc.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c +index 932560015b8..c12910161ab 100644 +--- a/dlls/odbc32/proxyodbc.c ++++ b/dlls/odbc32/proxyodbc.c +@@ -397,7 +397,11 @@ static void init_object( struct object *obj, UINT32 type, struct object *parent + obj->parent = parent; + list_init( &obj->entry ); + list_init( &obj->children ); +- if (parent) list_add_tail( &parent->children, &obj->entry ); ++ if (parent) ++ { ++ list_add_tail( &parent->children, &obj->entry ); ++ obj->win32_funcs = parent->win32_funcs; ++ } + InitializeCriticalSectionEx( &obj->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO ); + obj->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": object.cs"); + } +-- +2.43.0 + diff --git a/staging/upstream-commit b/staging/upstream-commit index c71c6f91..ab007cd7 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -d98f067294918aa5cfeadb576652dd8fd1757c38 +eef229cc1eb77c3236ab4e210a6a276b65173e39