From 39ad9d862521f6125efca59e8ab48f7b1fd18c6c Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Thu, 18 Jul 2024 09:59:41 +1000 Subject: [PATCH] Rebase against ca938c795c0c7a2fa11384414809d9a328e3e96f. --- ...Attr-fake-success-for-SQL_ATTR_CONNE.patch | 28 ------------ ...nectAttrW-correct-default-return-val.patch | 25 ----------- ...ansact-handle-NULL-EnvironmentHandle.patch | 45 ------------------- staging/upstream-commit | 2 +- 4 files changed, 1 insertion(+), 99 deletions(-) delete mode 100644 patches/odbc32-fixes/0009-odbc32-SQLSetEnvAttr-fake-success-for-SQL_ATTR_CONNE.patch delete mode 100644 patches/odbc32-fixes/0010-odbc32-SQLSetConnectAttrW-correct-default-return-val.patch delete mode 100644 patches/odbc32-fixes/0013-odbc32-SQLTransact-handle-NULL-EnvironmentHandle.patch diff --git a/patches/odbc32-fixes/0009-odbc32-SQLSetEnvAttr-fake-success-for-SQL_ATTR_CONNE.patch b/patches/odbc32-fixes/0009-odbc32-SQLSetEnvAttr-fake-success-for-SQL_ATTR_CONNE.patch deleted file mode 100644 index 3ff9145a..00000000 --- a/patches/odbc32-fixes/0009-odbc32-SQLSetEnvAttr-fake-success-for-SQL_ATTR_CONNE.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 530ff70a5850037732caf2d49954d09bb309f9b9 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sat, 13 Jul 2024 14:43:47 +1000 -Subject: [PATCH] odbc32: SQLSetEnvAttr fake success for - SQL_ATTR_CONNECTION_POOLING - ---- - dlls/odbc32/proxyodbc.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c -index 1c92560d7ee..125979a5a15 100644 ---- a/dlls/odbc32/proxyodbc.c -+++ b/dlls/odbc32/proxyodbc.c -@@ -2374,6 +2374,10 @@ SQLRETURN WINAPI SQLSetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, - handle->env_attr_version = (UINT32)(ULONG_PTR)Value; - break; - -+ case SQL_ATTR_CONNECTION_POOLING: -+ FIXME("Ignore Pooling value\n"); -+ break; -+ - default: - FIXME( "unhandled attribute %d\n", Attribute ); - ret = SQL_ERROR; --- -2.43.0 - diff --git a/patches/odbc32-fixes/0010-odbc32-SQLSetConnectAttrW-correct-default-return-val.patch b/patches/odbc32-fixes/0010-odbc32-SQLSetConnectAttrW-correct-default-return-val.patch deleted file mode 100644 index 2a7a0ef8..00000000 --- a/patches/odbc32-fixes/0010-odbc32-SQLSetConnectAttrW-correct-default-return-val.patch +++ /dev/null @@ -1,25 +0,0 @@ -From e682ace7303d8b2b60e6cc3a578805c1d9e4a18e Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sat, 13 Jul 2024 15:11:49 +1000 -Subject: [PATCH] odbc32: SQLSetConnectAttrW correct default return value - ---- - 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 125979a5a15..550e7b16be4 100644 ---- a/dlls/odbc32/proxyodbc.c -+++ b/dlls/odbc32/proxyodbc.c -@@ -4129,7 +4129,7 @@ SQLRETURN WINAPI SQLSetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribu - SQLINTEGER StringLength) - { - struct handle *handle = ConnectionHandle; -- SQLRETURN ret = SQL_ERROR; -+ SQLRETURN ret = SQL_SUCCESS; - - TRACE("(ConnectionHandle %p, Attribute %d, Value %p, StringLength %d)\n", ConnectionHandle, Attribute, - Value, StringLength); --- -2.43.0 - diff --git a/patches/odbc32-fixes/0013-odbc32-SQLTransact-handle-NULL-EnvironmentHandle.patch b/patches/odbc32-fixes/0013-odbc32-SQLTransact-handle-NULL-EnvironmentHandle.patch deleted file mode 100644 index 9eeb1fc2..00000000 --- a/patches/odbc32-fixes/0013-odbc32-SQLTransact-handle-NULL-EnvironmentHandle.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 35dec93c2df3b2a4db6fe63036669ba7ccdd3806 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sun, 14 Jul 2024 19:02:11 +1000 -Subject: [PATCH] odbc32: SQLTransact handle NULL EnvironmentHandle - ---- - dlls/odbc32/proxyodbc.c | 17 ++++++++++++----- - 1 file changed, 12 insertions(+), 5 deletions(-) - -diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c -index 89d2cc29b71..30f3d5f34e9 100644 ---- a/dlls/odbc32/proxyodbc.c -+++ b/dlls/odbc32/proxyodbc.c -@@ -2655,16 +2655,23 @@ SQLRETURN WINAPI SQLTransact(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle - TRACE("(EnvironmentHandle %p, ConnectionHandle %p, CompletionType %d)\n", EnvironmentHandle, ConnectionHandle, - CompletionType); - -- if (!env || !con) return SQL_INVALID_HANDLE; -+ if (!env && !con) return SQL_INVALID_HANDLE; - -- if (env->unix_handle) -+ if ( (env && env->unix_handle) || (con && con->unix_handle)) - { -- struct SQLTransact_params params = { env->unix_handle, con->unix_handle, CompletionType }; -+ struct SQLTransact_params params = { env ? env->unix_handle : 0, -+ con ? con->unix_handle : 0, CompletionType }; - ret = ODBC_CALL( SQLTransact, ¶ms ); - } -- else if (env->win32_handle) -+ else if ( (env && env->win32_handle) || (con && con->win32_handle)) - { -- ret = env->win32_funcs->SQLTransact( env->win32_handle, con->win32_handle, CompletionType ); -+ const struct win32_funcs *win32_funcs = NULL; -+ -+ if (env) win32_funcs = env->win32_funcs; -+ else if (con) win32_funcs = con->win32_funcs; -+ -+ ret = win32_funcs->SQLTransact( env ? env->win32_handle : NULL, -+ con ? con->win32_handle : NULL, CompletionType ); - } - - TRACE("Returning %d\n", ret); --- -2.43.0 - diff --git a/staging/upstream-commit b/staging/upstream-commit index bee95f2b..5c7a352f 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -88a28aa5757ae74d9997b470d70216f10974247f +ca938c795c0c7a2fa11384414809d9a328e3e96f