Rebase against eef229cc1eb77c3236ab4e210a6a276b65173e39.

Fixes regression with latest odbc32.
This commit is contained in:
Alistair Leslie-Hughes 2024-08-14 07:58:01 +10:00
parent 4af1f11315
commit 51d8ac0717
4 changed files with 55 additions and 46 deletions

View File

@ -1,45 +0,0 @@
From 53c9ccb1d5008cf348268e6a053ff6414bc4773e Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
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

View File

@ -0,0 +1,25 @@
From daff4a3d283837c83f33bcc0141af4078e6251ac Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
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

View File

@ -0,0 +1,29 @@
From 9b5c4a85620c6f86a368d420221199da2f794c63 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
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

View File

@ -1 +1 @@
d98f067294918aa5cfeadb576652dd8fd1757c38
eef229cc1eb77c3236ab4e210a6a276b65173e39