diff --git a/patches/odbc-remove-unixodbc/0001-odbc32-Remove-unixODBC-support.patch b/patches/odbc-remove-unixodbc/0001-odbc32-Remove-unixODBC-support.patch index a444ce18..ea6fddad 100644 --- a/patches/odbc-remove-unixodbc/0001-odbc32-Remove-unixODBC-support.patch +++ b/patches/odbc-remove-unixodbc/0001-odbc32-Remove-unixODBC-support.patch @@ -1,4 +1,4 @@ -From 47ce8ff5045c8983ac86c1aeda745230c86bc275 Mon Sep 17 00:00:00 2001 +From c3ec036d558bfe68e9e3f5277e7cf12d2e29181e Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Thu, 2 Feb 2023 14:20:44 +1100 Subject: [PATCH] odbc32: Remove unixODBC support @@ -6,18 +6,18 @@ Subject: [PATCH] odbc32: Remove unixODBC support --- configure.ac | 10 - dlls/odbc32/Makefile.in | 5 +- - dlls/odbc32/proxyodbc.c | 1968 +++++---------------- + dlls/odbc32/proxyodbc.c | 2051 +++++----------------- dlls/odbc32/unixlib.c | 3673 --------------------------------------- - dlls/odbc32/unixlib.h | 1256 ------------- - 5 files changed, 419 insertions(+), 6493 deletions(-) + dlls/odbc32/unixlib.h | 1257 -------------- + 5 files changed, 419 insertions(+), 6577 deletions(-) delete mode 100644 dlls/odbc32/unixlib.c delete mode 100644 dlls/odbc32/unixlib.h diff --git a/configure.ac b/configure.ac -index 231ec7f17d6..c48ccfd809f 100644 +index 4c6578f49e4..915c6d48b38 100644 --- a/configure.ac +++ b/configure.ac -@@ -1426,16 +1426,6 @@ WINE_NOTICE_WITH(pcsclite,[test "x$PCSCLITE_LIBS" = x], +@@ -1428,16 +1428,6 @@ WINE_NOTICE_WITH(pcsclite,[test "x$PCSCLITE_LIBS" = x], [libpcsclite not found, smart cards won't be supported.], [enable_winscard]) @@ -51,10 +51,10 @@ index 0ec0ae8eaf4..a42f1473d67 100644 - unixlib.c + rsrc.rc diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c -index a3732c001be..89e4545f068 100644 +index 658dda29a6c..89e4545f068 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c -@@ -40,36 +40,19 @@ +@@ -40,46 +40,19 @@ #include "sql.h" #include "sqltypes.h" #include "sqlext.h" @@ -64,6 +64,16 @@ index a3732c001be..89e4545f068 100644 -WINE_DECLARE_DEBUG_CHANNEL(winediag); -#define ODBC_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params ) +- +-static BOOL is_wow64; +- +-static struct handle *alloc_handle( void ) +-{ +- struct handle *ret; +- if (!(ret = calloc( 1, sizeof(*ret) ))) return NULL; +- ret->row_count = 1; +- return ret; +-} /************************************************************************* * SQLAllocConnect [ODBC32.001] @@ -73,12 +83,11 @@ index a3732c001be..89e4545f068 100644 - struct SQLAllocConnect_params params; - struct handle *con, *env = EnvironmentHandle; - SQLRETURN ret; -+ SQLRETURN ret = SQL_ERROR; - +- - TRACE("(EnvironmentHandle %p, ConnectionHandle %p)\n", EnvironmentHandle, ConnectionHandle); - - *ConnectionHandle = 0; -- if (!(con = calloc( 1, sizeof(*con) ))) return SQL_ERROR; +- if (!(con = alloc_handle())) return SQL_ERROR; - - params.EnvironmentHandle = env->unix_handle; - if (SUCCESS((ret = ODBC_CALL( SQLAllocConnect, ¶ms )))) @@ -87,28 +96,29 @@ index a3732c001be..89e4545f068 100644 - *ConnectionHandle = con; - } - else free( con ); -- ++ SQLRETURN ret = SQL_ERROR; + - TRACE("Returning %d, ConnectionHandle %p\n", ret, *ConnectionHandle); + FIXME("(EnvironmentHandle %p, ConnectionHandle %p)\n", EnvironmentHandle, ConnectionHandle); + *ConnectionHandle = SQL_NULL_HDBC; return ret; } -@@ -78,23 +61,12 @@ SQLRETURN WINAPI SQLAllocConnect(SQLHENV EnvironmentHandle, SQLHDBC *ConnectionH +@@ -88,23 +61,12 @@ SQLRETURN WINAPI SQLAllocConnect(SQLHENV EnvironmentHandle, SQLHDBC *ConnectionH */ SQLRETURN WINAPI SQLAllocEnv(SQLHENV *EnvironmentHandle) { - struct SQLAllocEnv_params params; - struct handle *env; - SQLRETURN ret; -- -- TRACE("(EnvironmentHandle %p)\n", EnvironmentHandle); + SQLRETURN ret = SQL_ERROR; -- *EnvironmentHandle = 0; -- if (!(env = calloc( 1, sizeof(*env) ))) return SQL_ERROR; +- TRACE("(EnvironmentHandle %p)\n", EnvironmentHandle); + FIXME("(EnvironmentHandle %p)\n", EnvironmentHandle); +- *EnvironmentHandle = 0; +- if (!(env = alloc_handle())) return SQL_ERROR; +- - if (SUCCESS((ret = ODBC_CALL( SQLAllocEnv, ¶ms )))) - { - env->unix_handle = params.EnvironmentHandle; @@ -121,7 +131,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -103,25 +75,11 @@ SQLRETURN WINAPI SQLAllocEnv(SQLHENV *EnvironmentHandle) +@@ -113,25 +75,11 @@ SQLRETURN WINAPI SQLAllocEnv(SQLHENV *EnvironmentHandle) */ SQLRETURN WINAPI SQLAllocHandle(SQLSMALLINT HandleType, SQLHANDLE InputHandle, SQLHANDLE *OutputHandle) { @@ -134,7 +144,7 @@ index a3732c001be..89e4545f068 100644 + FIXME("(HandleType %d, InputHandle %p, OutputHandle %p)\n", HandleType, InputHandle, OutputHandle); *OutputHandle = 0; -- if (!(output = calloc( 1, sizeof(*output) ))) return SQL_ERROR; +- if (!(output = alloc_handle())) return SQL_ERROR; - - params.HandleType = HandleType; - params.InputHandle = input ? input->unix_handle : 0; @@ -149,20 +159,19 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -130,24 +88,11 @@ SQLRETURN WINAPI SQLAllocHandle(SQLSMALLINT HandleType, SQLHANDLE InputHandle, S +@@ -140,24 +88,11 @@ SQLRETURN WINAPI SQLAllocHandle(SQLSMALLINT HandleType, SQLHANDLE InputHandle, S */ SQLRETURN WINAPI SQLAllocStmt(SQLHDBC ConnectionHandle, SQLHSTMT *StatementHandle) { - struct SQLAllocStmt_params params; - struct handle *stmt, *con = ConnectionHandle; - SQLRETURN ret; +- +- TRACE("(ConnectionHandle %p, StatementHandle %p)\n", ConnectionHandle, StatementHandle); + SQLRETURN ret = SQL_ERROR; -- TRACE("(ConnectionHandle %p, StatementHandle %p)\n", ConnectionHandle, StatementHandle); -+ FIXME("(ConnectionHandle %p, StatementHandle %p)\n", ConnectionHandle, StatementHandle); - - *StatementHandle = 0; -- if (!(stmt = calloc( 1, sizeof(*stmt) ))) return SQL_ERROR; +- if (!(stmt = alloc_handle())) return SQL_ERROR; - - params.ConnectionHandle = con->unix_handle; - if (SUCCESS((ret = ODBC_CALL( SQLAllocStmt, ¶ms )))) @@ -171,13 +180,14 @@ index a3732c001be..89e4545f068 100644 - *StatementHandle = stmt; - } - else free( stmt ); -- ++ FIXME("(ConnectionHandle %p, StatementHandle %p)\n", ConnectionHandle, StatementHandle); + - TRACE ("Returning %d, StatementHandle %p\n", ret, *StatementHandle); + *StatementHandle = SQL_NULL_HSTMT; return ret; } -@@ -156,25 +101,11 @@ SQLRETURN WINAPI SQLAllocStmt(SQLHDBC ConnectionHandle, SQLHSTMT *StatementHandl +@@ -166,25 +101,11 @@ SQLRETURN WINAPI SQLAllocStmt(SQLHDBC ConnectionHandle, SQLHSTMT *StatementHandl */ SQLRETURN WINAPI SQLAllocHandleStd(SQLSMALLINT HandleType, SQLHANDLE InputHandle, SQLHANDLE *OutputHandle) { @@ -190,7 +200,7 @@ index a3732c001be..89e4545f068 100644 + FIXME("(HandleType %d, InputHandle %p, OutputHandle %p)\n", HandleType, InputHandle, OutputHandle); *OutputHandle = 0; -- if (!(output = calloc( 1, sizeof(*output) ))) return SQL_ERROR; +- if (!(output = alloc_handle())) return SQL_ERROR; - - params.HandleType = HandleType; - params.InputHandle = input ? input->unix_handle : 0; @@ -205,19 +215,22 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -187,43 +118,17 @@ static const char *debugstr_sqllen( SQLLEN len ) +@@ -197,47 +118,17 @@ static const char *debugstr_sqllen( SQLLEN len ) #endif } --static BOOL resize_binding( struct param_binding *binding, UINT32 count ) +-#define MAX_BINDING_PARAMS 1024 +-static BOOL alloc_binding( struct param_binding *binding, UINT column, UINT row_count ) -{ -- struct param *tmp; -- UINT32 new_count = max( binding->count, count ); +- if (column > MAX_BINDING_PARAMS) +- { +- FIXME( "increase maximum number of parameters\n" ); +- return FALSE; +- } +- if (!binding->param && !(binding->param = calloc( MAX_BINDING_PARAMS, sizeof(*binding->param)))) return FALSE; - -- if (!(tmp = realloc( binding->param, new_count * sizeof(*tmp) ))) return FALSE; -- memset( tmp + binding->count, 0, (new_count - binding->count) * sizeof(*tmp) ); -- binding->param = tmp; -- binding->count = new_count; +- if (!(binding->param[column - 1].len = calloc( row_count, sizeof(UINT64) ))) return FALSE; +- binding->count = column; - return TRUE; -} - @@ -243,15 +256,16 @@ index a3732c001be..89e4545f068 100644 - FIXME( "column 0 not handled\n" ); - return SQL_ERROR; - } -- if (!resize_binding( &handle->bind_col, ColumnNumber )) return SQL_ERROR; +- if (!alloc_binding( &handle->bind_col, ColumnNumber, handle->row_count )) return SQL_ERROR; - params.StatementHandle = handle->unix_handle; -- params.StrLen_or_Ind = &handle->bind_col.param[i].len; +- params.StrLen_or_Ind = handle->bind_col.param[i].len; +- *(UINT64 *)params.StrLen_or_Ind = *StrLen_or_Ind; - if (SUCCESS(( ret = ODBC_CALL( SQLBindCol, ¶ms )))) handle->bind_col.param[i].ptr = StrLen_or_Ind; - TRACE ("Returning %d\n", ret); return ret; } -@@ -243,28 +148,12 @@ SQLRETURN WINAPI SQLBindParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNu +@@ -257,29 +148,12 @@ SQLRETURN WINAPI SQLBindParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNu SQLSMALLINT ParameterType, SQLULEN LengthPrecision, SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue, SQLLEN *StrLen_or_Ind) { @@ -273,16 +287,17 @@ index a3732c001be..89e4545f068 100644 - FIXME( "parameter 0 not handled\n" ); - return SQL_ERROR; - } -- if (!resize_binding( &handle->bind_param, ParameterNumber )) return SQL_ERROR; +- if (!alloc_binding( &handle->bind_param, ParameterNumber, handle->row_count )) return SQL_ERROR; - - params.StatementHandle = handle->unix_handle; -- params.StrLen_or_Ind = &handle->bind_param.param[i].len; +- params.StrLen_or_Ind = handle->bind_param.param[i].len; +- *(UINT64 *)params.StrLen_or_Ind = *StrLen_or_Ind; - if (SUCCESS(( ret = ODBC_CALL( SQLBindParam, ¶ms )))) handle->bind_param.param[i].ptr = StrLen_or_Ind; - TRACE ("Returning %d\n", ret); return ret; } -@@ -273,17 +162,10 @@ SQLRETURN WINAPI SQLBindParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNu +@@ -288,17 +162,10 @@ SQLRETURN WINAPI SQLBindParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNu */ SQLRETURN WINAPI SQLCancel(SQLHSTMT StatementHandle) { @@ -302,7 +317,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -292,43 +174,27 @@ SQLRETURN WINAPI SQLCancel(SQLHSTMT StatementHandle) +@@ -307,43 +174,27 @@ SQLRETURN WINAPI SQLCancel(SQLHSTMT StatementHandle) */ SQLRETURN WINAPI SQLCloseCursor(SQLHSTMT StatementHandle) { @@ -353,7 +368,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -339,23 +205,15 @@ SQLRETURN WINAPI SQLColumns(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLS +@@ -354,23 +205,15 @@ SQLRETURN WINAPI SQLColumns(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLS SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLCHAR *ColumnName, SQLSMALLINT NameLength4) { @@ -379,7 +394,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -366,21 +224,14 @@ SQLRETURN WINAPI SQLConnect(SQLHDBC ConnectionHandle, SQLCHAR *ServerName, SQLSM +@@ -381,21 +224,14 @@ SQLRETURN WINAPI SQLConnect(SQLHDBC ConnectionHandle, SQLCHAR *ServerName, SQLSM SQLCHAR *UserName, SQLSMALLINT NameLength2, SQLCHAR *Authentication, SQLSMALLINT NameLength3) { @@ -403,20 +418,20 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -389,18 +240,10 @@ SQLRETURN WINAPI SQLConnect(SQLHDBC ConnectionHandle, SQLCHAR *ServerName, SQLSM +@@ -404,18 +240,10 @@ SQLRETURN WINAPI SQLConnect(SQLHDBC ConnectionHandle, SQLCHAR *ServerName, SQLSM */ SQLRETURN WINAPI SQLCopyDesc(SQLHDESC SourceDescHandle, SQLHDESC TargetDescHandle) { - struct SQLCopyDesc_params params; - struct handle *source = SourceDescHandle, *target = TargetDescHandle; - SQLRETURN ret; +- +- TRACE("(SourceDescHandle %p, TargetDescHandle %p)\n", SourceDescHandle, TargetDescHandle); + SQLRETURN ret = SQL_ERROR; -- TRACE("(SourceDescHandle %p, TargetDescHandle %p)\n", SourceDescHandle, TargetDescHandle); +- if (!source || !target) return SQL_INVALID_HANDLE; + FIXME("(SourceDescHandle %p, TargetDescHandle %p)\n", SourceDescHandle, TargetDescHandle); -- if (!source || !target) return SQL_INVALID_HANDLE; -- - params.SourceDescHandle = source->unix_handle; - params.TargetDescHandle = target->unix_handle; - ret = ODBC_CALL( SQLCopyDesc, ¶ms ); @@ -424,7 +439,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -411,28 +254,12 @@ SQLRETURN WINAPI SQLDataSources(SQLHENV EnvironmentHandle, SQLUSMALLINT Directio +@@ -426,28 +254,12 @@ SQLRETURN WINAPI SQLDataSources(SQLHENV EnvironmentHandle, SQLUSMALLINT Directio SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1, SQLCHAR *Description, SQLSMALLINT BufferLength2, SQLSMALLINT *NameLength2) { @@ -455,7 +470,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -440,8 +267,13 @@ SQLRETURN WINAPI SQLDataSourcesA(SQLHENV EnvironmentHandle, SQLUSMALLINT Directi +@@ -455,8 +267,13 @@ SQLRETURN WINAPI SQLDataSourcesA(SQLHENV EnvironmentHandle, SQLUSMALLINT Directi SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1, SQLCHAR *Description, SQLSMALLINT BufferLength2, SQLSMALLINT *NameLength2) { @@ -471,7 +486,7 @@ index a3732c001be..89e4545f068 100644 } /************************************************************************* -@@ -451,36 +283,12 @@ SQLRETURN WINAPI SQLDescribeCol(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNum +@@ -466,36 +283,12 @@ SQLRETURN WINAPI SQLDescribeCol(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNum SQLSMALLINT BufferLength, SQLSMALLINT *NameLength, SQLSMALLINT *DataType, SQLULEN *ColumnSize, SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable) { @@ -510,47 +525,47 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -489,17 +297,10 @@ SQLRETURN WINAPI SQLDescribeCol(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNum +@@ -504,17 +297,10 @@ SQLRETURN WINAPI SQLDescribeCol(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNum */ SQLRETURN WINAPI SQLDisconnect(SQLHDBC ConnectionHandle) { - struct SQLDisconnect_params params; - struct handle *handle = ConnectionHandle; - SQLRETURN ret; -- -- TRACE("(ConnectionHandle %p)\n", ConnectionHandle); + SQLRETURN ret = SQL_ERROR; -- if (!handle) return SQL_INVALID_HANDLE; +- TRACE("(ConnectionHandle %p)\n", ConnectionHandle); + FIXME("(ConnectionHandle %p)\n", ConnectionHandle); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.ConnectionHandle = handle->unix_handle; - ret = ODBC_CALL( SQLDisconnect, ¶ms ); - TRACE("Returning %d\n", ret); return ret; } -@@ -508,17 +309,10 @@ SQLRETURN WINAPI SQLDisconnect(SQLHDBC ConnectionHandle) +@@ -523,17 +309,10 @@ SQLRETURN WINAPI SQLDisconnect(SQLHDBC ConnectionHandle) */ SQLRETURN WINAPI SQLEndTran(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT CompletionType) { - struct SQLEndTran_params params = { HandleType, 0, CompletionType }; - struct handle *handle = Handle; - SQLRETURN ret; +- +- TRACE("(HandleType %d, Handle %p, CompletionType %d)\n", HandleType, Handle, CompletionType); + SQLRETURN ret = SQL_ERROR; -- TRACE("(HandleType %d, Handle %p, CompletionType %d)\n", HandleType, Handle, CompletionType); +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(HandleType %d, Handle %p, CompletionType %d)\n", HandleType, Handle, CompletionType); -- if (!handle) return SQL_INVALID_HANDLE; -- - params.Handle = handle->unix_handle; - ret = ODBC_CALL( SQLEndTran, ¶ms ); - TRACE("Returning %d\n", ret); return ret; } -@@ -526,28 +320,15 @@ SQLRETURN WINAPI SQLEndTran(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLIN +@@ -541,28 +320,15 @@ SQLRETURN WINAPI SQLEndTran(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLIN * SQLError [ODBC32.010] */ SQLRETURN WINAPI SQLError(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, SQLHSTMT StatementHandle, @@ -567,8 +582,7 @@ index a3732c001be..89e4545f068 100644 + FIXME("(EnvironmentHandle %p, ConnectionHandle %p, StatementHandle %p, Sqlstate %p, NativeError %p," " MessageText %p, BufferLength %d, TextLength %p)\n", EnvironmentHandle, ConnectionHandle, - StatementHandle, SqlState, NativeError, MessageText, BufferLength, TextLength); -+ StatementHandle, Sqlstate, NativeError, MessageText, BufferLength, TextLength); - +- - if (env) params.EnvironmentHandle = env->unix_handle; - if (con) params.ConnectionHandle = con->unix_handle; - if (stmt) params.StatementHandle = stmt->unix_handle; @@ -578,12 +592,13 @@ index a3732c001be..89e4545f068 100644 - TRACE(" Error %d\n", *NativeError); - TRACE(" MessageText %s\n", debugstr_an((const char *)MessageText, *TextLength)); - } -- ++ StatementHandle, Sqlstate, NativeError, MessageText, BufferLength, TextLength); + - TRACE("Returning %d\n", ret); return ret; } -@@ -556,18 +337,11 @@ SQLRETURN WINAPI SQLError(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, S +@@ -571,18 +337,11 @@ SQLRETURN WINAPI SQLError(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, S */ SQLRETURN WINAPI SQLExecDirect(SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQLINTEGER TextLength) { @@ -604,20 +619,20 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -576,58 +350,22 @@ SQLRETURN WINAPI SQLExecDirect(SQLHSTMT StatementHandle, SQLCHAR *StatementText, +@@ -591,75 +350,22 @@ SQLRETURN WINAPI SQLExecDirect(SQLHSTMT StatementHandle, SQLCHAR *StatementText, */ SQLRETURN WINAPI SQLExecute(SQLHSTMT StatementHandle) { - struct SQLExecute_params params; - struct handle *handle = StatementHandle; - SQLRETURN ret; +- +- TRACE("(StatementHandle %p)\n", StatementHandle); + SQLRETURN ret = SQL_ERROR; -- TRACE("(StatementHandle %p)\n", StatementHandle); +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(StatementHandle %p)\n", StatementHandle); -- if (!handle) return SQL_INVALID_HANDLE; -- - params.StatementHandle = handle->unix_handle; - ret = ODBC_CALL( SQLExecute, ¶ms ); - TRACE("Returning %d\n", ret); @@ -626,22 +641,39 @@ index a3732c001be..89e4545f068 100644 -static void update_result_lengths( struct handle *handle ) -{ -- UINT i; +- UINT i, j, width = sizeof(void *) == 8 ? 8 : is_wow64 ? 8 : 4; +- - for (i = 0; i < handle->bind_col.count; i++) - { -- if (handle->bind_col.param[i].ptr) -- *(SQLLEN *)handle->bind_col.param[i].ptr = handle->bind_col.param[i].len; +- SQLLEN *ptr = handle->bind_col.param[i].ptr; +- if (ptr) +- { +- for (j = 0; j < handle->row_count; j++) +- { +- *ptr++ = *(SQLLEN *)(handle->bind_col.param[i].len + j * width); +- } +- } - } - for (i = 0; i < handle->bind_param.count; i++) - { -- if (handle->bind_param.param[i].ptr) -- *(SQLLEN *)handle->bind_param.param[i].ptr = handle->bind_param.param[i].len; +- SQLLEN *ptr = handle->bind_param.param[i].ptr; +- if (ptr) +- { +- for (j = 0; j < handle->row_count; j++) +- { +- *ptr++ = *(SQLLEN *)(handle->bind_param.param[i].len + j * width); +- } +- } - } - for (i = 0; i < handle->bind_parameter.count; i++) - { -- if (handle->bind_parameter.param[i].ptr) +- SQLLEN *ptr = handle->bind_parameter.param[i].ptr; +- if (ptr) - { -- *(SQLLEN *)handle->bind_parameter.param[i].ptr = handle->bind_parameter.param[i].len; +- for (j = 0; j < handle->row_count; j++) +- { +- *ptr++ = *(SQLLEN *)(handle->bind_parameter.param[i].len + j * width); +- } - } - } -} @@ -654,20 +686,20 @@ index a3732c001be..89e4545f068 100644 - struct SQLFetch_params params; - struct handle *handle = StatementHandle; - SQLRETURN ret; -- -- TRACE("(StatementHandle %p)\n", StatementHandle); + SQLRETURN ret = SQL_ERROR; -- if (!handle) return SQL_INVALID_HANDLE; +- TRACE("(StatementHandle %p)\n", StatementHandle); + FIXME("(StatementHandle %p)\n", StatementHandle); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.StatementHandle = handle->unix_handle; - if (SUCCESS(( ret = ODBC_CALL( SQLFetch, ¶ms )))) update_result_lengths( handle ); - TRACE("Returning %d\n", ret); return ret; } -@@ -636,18 +374,11 @@ SQLRETURN WINAPI SQLFetch(SQLHSTMT StatementHandle) +@@ -668,18 +374,11 @@ SQLRETURN WINAPI SQLFetch(SQLHSTMT StatementHandle) */ SQLRETURN WINAPI SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrientation, SQLLEN FetchOffset) { @@ -688,20 +720,20 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -656,18 +387,10 @@ SQLRETURN WINAPI SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrien +@@ -688,18 +387,10 @@ SQLRETURN WINAPI SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrien */ SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle) { - struct SQLFreeConnect_params params; - struct handle *handle = ConnectionHandle; - SQLRETURN ret; -- -- TRACE("(ConnectionHandle %p)\n", ConnectionHandle); + SQLRETURN ret = SQL_ERROR; -- if (!handle) return SQL_INVALID_HANDLE; +- TRACE("(ConnectionHandle %p)\n", ConnectionHandle); + FIXME("(ConnectionHandle %p)\n", ConnectionHandle); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.ConnectionHandle = handle->unix_handle; - ret = ODBC_CALL( SQLFreeConnect, ¶ms ); - free( handle ); @@ -709,7 +741,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -676,47 +399,22 @@ SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle) +@@ -708,59 +399,22 @@ SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle) */ SQLRETURN WINAPI SQLFreeEnv(SQLHENV EnvironmentHandle) { @@ -732,9 +764,21 @@ index a3732c001be..89e4545f068 100644 -static void free_bindings( struct handle *handle ) -{ -- free( handle->bind_col.param ); -- free( handle->bind_param.param ); -- free( handle->bind_parameter.param ); +- if (handle->bind_col.param) +- { +- free( handle->bind_col.param->len ); +- free( handle->bind_col.param ); +- } +- if (handle->bind_param.param) +- { +- free( handle->bind_param.param->len ); +- free( handle->bind_param.param ); +- } +- if (handle->bind_parameter.param) +- { +- free( handle->bind_parameter.param->len ); +- free( handle->bind_parameter.param ); +- } -} - /************************************************************************* @@ -761,7 +805,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -725,20 +423,10 @@ SQLRETURN WINAPI SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle) +@@ -769,20 +423,10 @@ SQLRETURN WINAPI SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle) */ SQLRETURN WINAPI SQLFreeStmt(SQLHSTMT StatementHandle, SQLUSMALLINT Option) { @@ -784,7 +828,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -748,18 +436,11 @@ SQLRETURN WINAPI SQLFreeStmt(SQLHSTMT StatementHandle, SQLUSMALLINT Option) +@@ -792,18 +436,11 @@ SQLRETURN WINAPI SQLFreeStmt(SQLHSTMT StatementHandle, SQLUSMALLINT Option) SQLRETURN WINAPI SQLGetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { @@ -805,27 +849,27 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -768,17 +449,10 @@ SQLRETURN WINAPI SQLGetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribut +@@ -812,17 +449,10 @@ SQLRETURN WINAPI SQLGetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribut */ SQLRETURN WINAPI SQLGetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLPOINTER Value) { - struct SQLGetConnectOption_params params = { 0, Option, Value }; - struct handle *handle = ConnectionHandle; - SQLRETURN ret; -- -- TRACE("(ConnectionHandle %p, Option %d, Value %p)\n", ConnectionHandle, Option, Value); + SQLRETURN ret = SQL_ERROR; -- if (!handle) return SQL_INVALID_HANDLE; +- TRACE("(ConnectionHandle %p, Option %d, Value %p)\n", ConnectionHandle, Option, Value); + FIXME("(ConnectionHandle %p, Option %d, Value %p)\n", ConnectionHandle, Option, Value); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.ConnectionHandle = handle->unix_handle; - ret = ODBC_CALL( SQLGetConnectOption, ¶ms ); - TRACE("Returning %d\n", ret); return ret; } -@@ -788,18 +462,11 @@ SQLRETURN WINAPI SQLGetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Opti +@@ -832,18 +462,11 @@ SQLRETURN WINAPI SQLGetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Opti SQLRETURN WINAPI SQLGetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLSMALLINT BufferLength, SQLSMALLINT *NameLength) { @@ -846,7 +890,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -809,20 +476,11 @@ SQLRETURN WINAPI SQLGetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, +@@ -853,20 +476,11 @@ SQLRETURN WINAPI SQLGetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLRETURN WINAPI SQLGetData(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType, SQLPOINTER TargetValue, SQLLEN BufferLength, SQLLEN *StrLen_or_Ind) { @@ -869,7 +913,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -832,18 +490,11 @@ SQLRETURN WINAPI SQLGetData(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, +@@ -876,18 +490,11 @@ SQLRETURN WINAPI SQLGetData(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLRETURN WINAPI SQLGetDescField(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { @@ -890,7 +934,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -855,22 +506,12 @@ SQLRETURN WINAPI SQLGetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, +@@ -899,22 +506,12 @@ SQLRETURN WINAPI SQLGetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT *SubType, SQLLEN *Length, SQLSMALLINT *Precision, SQLSMALLINT *Scale, SQLSMALLINT *Nullable) { @@ -915,7 +959,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -881,19 +522,11 @@ SQLRETURN WINAPI SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSM +@@ -925,19 +522,11 @@ SQLRETURN WINAPI SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSM SQLSMALLINT DiagIdentifier, SQLPOINTER DiagInfo, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength) { @@ -937,7 +981,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -901,23 +534,15 @@ SQLRETURN WINAPI SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSM +@@ -945,23 +534,15 @@ SQLRETURN WINAPI SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSM * SQLGetDiagRec [ODBC32.036] */ SQLRETURN WINAPI SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, @@ -965,7 +1009,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -927,18 +552,11 @@ SQLRETURN WINAPI SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMAL +@@ -971,18 +552,11 @@ SQLRETURN WINAPI SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMAL SQLRETURN WINAPI SQLGetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { @@ -986,7 +1030,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -947,17 +565,10 @@ SQLRETURN WINAPI SQLGetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, +@@ -991,17 +565,10 @@ SQLRETURN WINAPI SQLGetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, */ SQLRETURN WINAPI SQLGetFunctions(SQLHDBC ConnectionHandle, SQLUSMALLINT FunctionId, SQLUSMALLINT *Supported) { @@ -1006,7 +1050,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -967,18 +578,11 @@ SQLRETURN WINAPI SQLGetFunctions(SQLHDBC ConnectionHandle, SQLUSMALLINT Function +@@ -1011,18 +578,11 @@ SQLRETURN WINAPI SQLGetFunctions(SQLHDBC ConnectionHandle, SQLUSMALLINT Function SQLRETURN WINAPI SQLGetInfo(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQLPOINTER InfoValue, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength) { @@ -1027,7 +1071,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -988,11 +592,9 @@ SQLRETURN WINAPI SQLGetInfo(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQL +@@ -1032,11 +592,9 @@ SQLRETURN WINAPI SQLGetInfo(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQL SQLRETURN WINAPI SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { @@ -1041,7 +1085,7 @@ index a3732c001be..89e4545f068 100644 Attribute, Value, BufferLength, StringLength); if (!Value) -@@ -1001,11 +603,6 @@ SQLRETURN WINAPI SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, +@@ -1045,11 +603,6 @@ SQLRETURN WINAPI SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, return SQL_ERROR; } @@ -1053,7 +1097,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -1014,17 +611,10 @@ SQLRETURN WINAPI SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, +@@ -1058,17 +611,10 @@ SQLRETURN WINAPI SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, */ SQLRETURN WINAPI SQLGetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, SQLPOINTER Value) { @@ -1073,7 +1117,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -1033,17 +623,10 @@ SQLRETURN WINAPI SQLGetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, +@@ -1077,17 +623,10 @@ SQLRETURN WINAPI SQLGetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, */ SQLRETURN WINAPI SQLGetTypeInfo(SQLHSTMT StatementHandle, SQLSMALLINT DataType) { @@ -1093,7 +1137,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -1052,17 +635,10 @@ SQLRETURN WINAPI SQLGetTypeInfo(SQLHSTMT StatementHandle, SQLSMALLINT DataType) +@@ -1096,17 +635,10 @@ SQLRETURN WINAPI SQLGetTypeInfo(SQLHSTMT StatementHandle, SQLSMALLINT DataType) */ SQLRETURN WINAPI SQLNumResultCols(SQLHSTMT StatementHandle, SQLSMALLINT *ColumnCount) { @@ -1113,27 +1157,27 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -1071,17 +647,10 @@ SQLRETURN WINAPI SQLNumResultCols(SQLHSTMT StatementHandle, SQLSMALLINT *ColumnC +@@ -1115,17 +647,10 @@ SQLRETURN WINAPI SQLNumResultCols(SQLHSTMT StatementHandle, SQLSMALLINT *ColumnC */ SQLRETURN WINAPI SQLParamData(SQLHSTMT StatementHandle, SQLPOINTER *Value) { - struct SQLParamData_params params = { 0, Value }; - struct handle *handle = StatementHandle; - SQLRETURN ret; -- -- TRACE("(StatementHandle %p, Value %p)\n", StatementHandle, Value); + SQLRETURN ret = SQL_ERROR; -- if (!handle) return SQL_INVALID_HANDLE; +- TRACE("(StatementHandle %p, Value %p)\n", StatementHandle, Value); + FIXME("(StatementHandle %p, Value %p)\n", StatementHandle, Value); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.StatementHandle = handle->unix_handle; - ret = ODBC_CALL( SQLParamData, ¶ms ); - TRACE("Returning %d\n", ret); return ret; } -@@ -1090,18 +659,11 @@ SQLRETURN WINAPI SQLParamData(SQLHSTMT StatementHandle, SQLPOINTER *Value) +@@ -1134,18 +659,11 @@ SQLRETURN WINAPI SQLParamData(SQLHSTMT StatementHandle, SQLPOINTER *Value) */ SQLRETURN WINAPI SQLPrepare(SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQLINTEGER TextLength) { @@ -1154,27 +1198,27 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -1110,17 +672,10 @@ SQLRETURN WINAPI SQLPrepare(SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQ +@@ -1154,17 +672,10 @@ SQLRETURN WINAPI SQLPrepare(SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQ */ SQLRETURN WINAPI SQLPutData(SQLHSTMT StatementHandle, SQLPOINTER Data, SQLLEN StrLen_or_Ind) { - struct SQLPutData_params params = { 0, Data, StrLen_or_Ind }; - struct handle *handle = StatementHandle; - SQLRETURN ret; -- -- TRACE("(StatementHandle %p, Data %p, StrLen_or_Ind %s)\n", StatementHandle, Data, debugstr_sqllen(StrLen_or_Ind)); + SQLRETURN ret = SQL_ERROR; -- if (!handle) return SQL_INVALID_HANDLE; +- TRACE("(StatementHandle %p, Data %p, StrLen_or_Ind %s)\n", StatementHandle, Data, debugstr_sqllen(StrLen_or_Ind)); + FIXME("(StatementHandle %p, Data %p, StrLen_or_Ind %s)\n", StatementHandle, Data, debugstr_sqllen(StrLen_or_Ind)); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.StatementHandle = handle->unix_handle; - ret = ODBC_CALL( SQLPutData, ¶ms ); - TRACE("Returning %d\n", ret); return ret; } -@@ -1129,23 +684,10 @@ SQLRETURN WINAPI SQLPutData(SQLHSTMT StatementHandle, SQLPOINTER Data, SQLLEN St +@@ -1173,23 +684,10 @@ SQLRETURN WINAPI SQLPutData(SQLHSTMT StatementHandle, SQLPOINTER Data, SQLLEN St */ SQLRETURN WINAPI SQLRowCount(SQLHSTMT StatementHandle, SQLLEN *RowCount) { @@ -1182,13 +1226,13 @@ index a3732c001be..89e4545f068 100644 - struct handle *handle = StatementHandle; - INT64 count; - SQLRETURN ret; +- +- TRACE("(StatementHandle %p, RowCount %p)\n", StatementHandle, RowCount); + SQLRETURN ret = SQL_ERROR; -- TRACE("(StatementHandle %p, RowCount %p)\n", StatementHandle, RowCount); +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(StatementHandle %p, RowCount %p)\n", StatementHandle, RowCount); -- if (!handle) return SQL_INVALID_HANDLE; -- - params.StatementHandle = handle->unix_handle; - params.RowCount = &count; - if (SUCCESS((ret = ODBC_CALL( SQLRowCount, ¶ms ))) && RowCount) @@ -1200,7 +1244,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -1155,18 +697,11 @@ SQLRETURN WINAPI SQLRowCount(SQLHSTMT StatementHandle, SQLLEN *RowCount) +@@ -1199,18 +697,11 @@ SQLRETURN WINAPI SQLRowCount(SQLHSTMT StatementHandle, SQLLEN *RowCount) SQLRETURN WINAPI SQLSetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength) { @@ -1221,7 +1265,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -1175,17 +710,10 @@ SQLRETURN WINAPI SQLSetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribut +@@ -1219,17 +710,10 @@ SQLRETURN WINAPI SQLSetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribut */ SQLRETURN WINAPI SQLSetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLULEN Value) { @@ -1241,7 +1285,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -1194,18 +722,11 @@ SQLRETURN WINAPI SQLSetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Opti +@@ -1238,18 +722,11 @@ SQLRETURN WINAPI SQLSetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Opti */ SQLRETURN WINAPI SQLSetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLSMALLINT NameLength) { @@ -1262,7 +1306,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -1215,18 +736,11 @@ SQLRETURN WINAPI SQLSetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, +@@ -1259,18 +736,11 @@ SQLRETURN WINAPI SQLSetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLRETURN WINAPI SQLSetDescField(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength) { @@ -1283,7 +1327,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -1237,26 +751,12 @@ SQLRETURN WINAPI SQLSetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, +@@ -1281,26 +751,12 @@ SQLRETURN WINAPI SQLSetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT SubType, SQLLEN Length, SQLSMALLINT Precision, SQLSMALLINT Scale, SQLPOINTER Data, SQLLEN *StringLength, SQLLEN *Indicator) { @@ -1312,7 +1356,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -1266,16 +766,11 @@ SQLRETURN WINAPI SQLSetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, +@@ -1310,16 +766,11 @@ SQLRETURN WINAPI SQLSetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLRETURN WINAPI SQLSetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength) { @@ -1331,7 +1375,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -1286,22 +781,12 @@ SQLRETURN WINAPI SQLSetParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNum +@@ -1330,76 +781,26 @@ SQLRETURN WINAPI SQLSetParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNum SQLSMALLINT ParameterType, SQLULEN LengthPrecision, SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue, SQLLEN *StrLen_or_Ind) { @@ -1356,7 +1400,33 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -1311,18 +796,11 @@ SQLRETURN WINAPI SQLSetParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNum +-static BOOL resize_result_lengths( struct handle *handle, UINT size ) +-{ +- UINT i; +- for (i = 0; i < handle->bind_col.count; i++) +- { +- UINT8 *tmp = realloc( handle->bind_col.param[i].len, size * sizeof(UINT64) ); +- if (!tmp) return FALSE; +- handle->bind_col.param[i].len = tmp; +- } +- for (i = 0; i < handle->bind_param.count; i++) +- { +- UINT8 *tmp = realloc( handle->bind_param.param[i].len, size * sizeof(UINT64) ); +- if (!tmp) return FALSE; +- handle->bind_param.param[i].len = tmp; +- } +- for (i = 0; i < handle->bind_parameter.count; i++) +- { +- UINT8 *tmp = realloc( handle->bind_parameter.param[i].len, size * sizeof(UINT64) ); +- if (!tmp) return FALSE; +- handle->bind_parameter.param[i].len = tmp; +- } +- return TRUE; +-} +- + /************************************************************************* + * SQLSetStmtAttr [ODBC32.076] + */ SQLRETURN WINAPI SQLSetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength) { @@ -1372,32 +1442,41 @@ index a3732c001be..89e4545f068 100644 - if (!handle) return SQL_INVALID_HANDLE; - - params.StatementHandle = handle->unix_handle; -- ret = ODBC_CALL( SQLSetStmtAttr, ¶ms ); +- if (SUCCESS((ret = ODBC_CALL( SQLSetStmtAttr, ¶ms )))) +- { +- SQLULEN row_count = (SQLULEN)Value; +- if (Attribute == SQL_ATTR_ROW_ARRAY_SIZE && row_count != handle->row_count) +- { +- TRACE( "resizing result length array\n" ); +- if (!resize_result_lengths( handle, row_count )) ret = SQL_ERROR; +- else handle->row_count = row_count; +- } +- } - TRACE("Returning %d\n", ret); return ret; } -@@ -1331,17 +809,10 @@ SQLRETURN WINAPI SQLSetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, +@@ -1408,17 +809,10 @@ SQLRETURN WINAPI SQLSetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, */ SQLRETURN WINAPI SQLSetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, SQLULEN Value) { - struct SQLSetStmtOption_params params = { 0, Option, Value }; - struct handle *handle = StatementHandle; - SQLRETURN ret; +- +- TRACE("(StatementHandle %p, Option %d, Value %s)\n", StatementHandle, Option, debugstr_sqlulen(Value)); + SQLRETURN ret = SQL_ERROR; -- TRACE("(StatementHandle %p, Option %d, Value %s)\n", StatementHandle, Option, debugstr_sqlulen(Value)); +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(StatementHandle %p, Option %d, Value %s)\n", StatementHandle, Option, debugstr_sqlulen(Value)); -- if (!handle) return SQL_INVALID_HANDLE; -- - params.StatementHandle = handle->unix_handle; - ret = ODBC_CALL( SQLSetStmtOption, ¶ms ); - TRACE("Returning %d\n", ret); return ret; } -@@ -1353,22 +824,14 @@ SQLRETURN WINAPI SQLSpecialColumns(SQLHSTMT StatementHandle, SQLUSMALLINT Identi +@@ -1430,22 +824,14 @@ SQLRETURN WINAPI SQLSpecialColumns(SQLHSTMT StatementHandle, SQLUSMALLINT Identi SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLUSMALLINT Scope, SQLUSMALLINT Nullable) { @@ -1422,7 +1501,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -1379,22 +842,14 @@ SQLRETURN WINAPI SQLStatistics(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, S +@@ -1456,22 +842,14 @@ SQLRETURN WINAPI SQLStatistics(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, S SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLUSMALLINT Unique, SQLUSMALLINT Reserved) { @@ -1447,7 +1526,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -1405,23 +860,15 @@ SQLRETURN WINAPI SQLTables(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSM +@@ -1482,23 +860,15 @@ SQLRETURN WINAPI SQLTables(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSM SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLCHAR *TableType, SQLSMALLINT NameLength4) { @@ -1473,7 +1552,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -1430,42 +877,27 @@ SQLRETURN WINAPI SQLTables(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSM +@@ -1507,42 +877,27 @@ SQLRETURN WINAPI SQLTables(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSM */ SQLRETURN WINAPI SQLTransact(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, SQLUSMALLINT CompletionType) { @@ -1508,24 +1587,24 @@ index a3732c001be..89e4545f068 100644 - StringLength2 }; - struct handle *handle = ConnectionHandle; - SQLRETURN ret; -- ++ SQLRETURN ret = SQL_ERROR; + - TRACE("(ConnectionHandle %p, InConnectionString %s, StringLength1 %d, OutConnectionString %p, BufferLength, %d, " - "StringLength2 %p)\n", ConnectionHandle, debugstr_an((const char *)InConnectionString, StringLength1), - StringLength1, OutConnectionString, BufferLength, StringLength2); -+ SQLRETURN ret = SQL_ERROR; - -- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(hdbc %p, szConnStrIn %s, cbConnStrIn %d, szConnStrOut %p, cbConnStrOutMax %d, pcbConnStrOut %p)\n", + hdbc, debugstr_an((const char *)szConnStrIn, cbConnStrIn), cbConnStrIn, szConnStrOut, cbConnStrOutMax, + pcbConnStrOut); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.ConnectionHandle = handle->unix_handle; - ret = ODBC_CALL( SQLBrowseConnect, ¶ms ); - TRACE("Returning %d\n", ret); return ret; } -@@ -1474,149 +906,96 @@ SQLRETURN WINAPI SQLBrowseConnect(SQLHDBC ConnectionHandle, SQLCHAR *InConnectio +@@ -1551,149 +906,96 @@ SQLRETURN WINAPI SQLBrowseConnect(SQLHDBC ConnectionHandle, SQLCHAR *InConnectio */ SQLRETURN WINAPI SQLBulkOperations(SQLHSTMT StatementHandle, SQLSMALLINT Operation) { @@ -1718,7 +1797,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -1625,381 +1004,213 @@ SQLRETURN WINAPI SQLForeignKeys(SQLHSTMT StatementHandle, SQLCHAR *PkCatalogName +@@ -1702,382 +1004,213 @@ SQLRETURN WINAPI SQLForeignKeys(SQLHSTMT StatementHandle, SQLCHAR *PkCatalogName */ SQLRETURN WINAPI SQLMoreResults(SQLHSTMT StatementHandle) { @@ -1827,14 +1906,14 @@ index a3732c001be..89e4545f068 100644 - NameLength3 }; - struct handle *handle = StatementHandle; - SQLRETURN ret; -+ SQLRETURN ret = SQL_ERROR; - +- - TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d, TableName %s," - " NameLength3 %d)\n", StatementHandle, - debugstr_an((const char *)CatalogName, NameLength1), NameLength1, - debugstr_an((const char *)SchemaName, NameLength2), NameLength2, - debugstr_an((const char *)TableName, NameLength3), NameLength3); -- ++ SQLRETURN ret = SQL_ERROR; + - if (!handle) return SQL_INVALID_HANDLE; + FIXME("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szTableName %s," + " cbTableName %d)\n", hstmt, @@ -1862,15 +1941,15 @@ index a3732c001be..89e4545f068 100644 - ProcName, NameLength3, ColumnName, NameLength4 }; - struct handle *handle = StatementHandle; - SQLRETURN ret; -- ++ SQLRETURN ret = SQL_ERROR; + - TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d, ProcName %s," - " NameLength3 %d, ColumnName %s, NameLength4 %d)\n", StatementHandle, - debugstr_an((const char *)CatalogName, NameLength1), NameLength1, - debugstr_an((const char *)SchemaName, NameLength2), NameLength2, - debugstr_an((const char *)ProcName, NameLength3), NameLength3, - debugstr_an((const char *)ColumnName, NameLength4), NameLength4); -+ SQLRETURN ret = SQL_ERROR; - +- - if (!handle) return SQL_INVALID_HANDLE; + FIXME("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szProcName %s," + " cbProcName %d, szColumnName %s, cbColumnName %d)\n", hstmt, @@ -1899,21 +1978,21 @@ index a3732c001be..89e4545f068 100644 - NameLength3 }; - struct handle *handle = StatementHandle; - SQLRETURN ret; -+ SQLRETURN ret = SQL_ERROR; - +- - TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d, ProcName %s," - " NameLength3 %d)\n", StatementHandle, - debugstr_an((const char *)CatalogName, NameLength1), NameLength1, - debugstr_an((const char *)SchemaName, NameLength2), NameLength2, - debugstr_an((const char *)ProcName, NameLength3), NameLength3); ++ SQLRETURN ret = SQL_ERROR; + +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szProcName %s," + " cbProcName %d)\n", hstmt, + debugstr_an((const char *)szCatalogName, cbCatalogName), cbCatalogName, + debugstr_an((const char *)szSchemaName, cbSchemaName), cbSchemaName, + debugstr_an((const char *)szProcName, cbProcName), cbProcName); -- if (!handle) return SQL_INVALID_HANDLE; -- - params.StatementHandle = handle->unix_handle; - ret = ODBC_CALL( SQLProcedures, ¶ms ); - TRACE("Returning %d\n", ret); @@ -1996,23 +2075,23 @@ index a3732c001be..89e4545f068 100644 - DriverAttributes, BufferLength2, AttributesLength }; - struct handle *handle = EnvironmentHandle; - SQLRETURN ret; -+ SQLRETURN ret = SQL_NO_DATA; - +- - TRACE("(EnvironmentHandle %p, Direction %d, DriverDescription %p, BufferLength1 %d, DescriptionLength %p," - " DriverAttributes %p, BufferLength2 %d, AttributesLength %p)\n", EnvironmentHandle, Direction, - DriverDescription, BufferLength1, DescriptionLength, DriverAttributes, BufferLength2, AttributesLength); -+ FIXME("(EnvironmentHandle %p, Direction %d, szDriverDesc %p, cbDriverDescMax %d, pcbDriverDesc %p," -+ " DriverAttributes %p, cbDriverAttrMax %d, pcbDriverAttr %p)\n", EnvironmentHandle, fDirection, -+ szDriverDesc, cbDriverDescMax, pcbDriverDesc, szDriverAttributes, cbDriverAttrMax, pcbDriverAttr); - +- - if (!handle) return SQL_INVALID_HANDLE; - - params.EnvironmentHandle = handle->unix_handle; - ret = ODBC_CALL( SQLDrivers, ¶ms ); -- ++ SQLRETURN ret = SQL_NO_DATA; + - if (ret == SQL_NO_DATA && Direction == SQL_FETCH_FIRST) - ERR_(winediag)("No ODBC drivers could be found. Check the settings for your libodbc provider.\n"); -- ++ FIXME("(EnvironmentHandle %p, Direction %d, szDriverDesc %p, cbDriverDescMax %d, pcbDriverDesc %p," ++ " DriverAttributes %p, cbDriverAttrMax %d, pcbDriverAttr %p)\n", EnvironmentHandle, fDirection, ++ szDriverDesc, cbDriverDescMax, pcbDriverDesc, szDriverAttributes, cbDriverAttrMax, pcbDriverAttr); + - TRACE("Returning %d\n", ret); return ret; } @@ -2034,26 +2113,27 @@ index a3732c001be..89e4545f068 100644 - struct handle *handle = StatementHandle; - UINT i = ParameterNumber - 1; - SQLRETURN ret; -- ++ SQLRETURN ret = SQL_ERROR; + - TRACE("(StatementHandle %p, ParameterNumber %d, InputOutputType %d, ValueType %d, ParameterType %d, " - "ColumnSize %s, DecimalDigits %d, ParameterValue, %p, BufferLength %s, StrLen_or_Ind %p)\n", - StatementHandle, ParameterNumber, InputOutputType, ValueType, ParameterType, debugstr_sqlulen(ColumnSize), - DecimalDigits, ParameterValue, debugstr_sqllen(BufferLength), StrLen_or_Ind); -+ SQLRETURN ret = SQL_ERROR; - +- - if (!handle) return SQL_INVALID_HANDLE; - if (!ParameterNumber) - { - FIXME( "parameter 0 not handled\n" ); - return SQL_ERROR; - } -- if (!resize_binding( &handle->bind_parameter, ParameterNumber )) return SQL_ERROR; +- if (!alloc_binding( &handle->bind_parameter, ParameterNumber, handle->row_count )) return SQL_ERROR; + FIXME("(hstmt %p, ipar %d, fParamType %d, fCType %d, fSqlType %d, cbColDef %s, ibScale %d, rgbValue %p," + " cbValueMax %s, pcbValue %p)\n", hstmt, ipar, fParamType, fCType, fSqlType, debugstr_sqlulen(cbColDef), + ibScale, rgbValue, debugstr_sqllen(cbValueMax), pcbValue); - params.StatementHandle = handle->unix_handle; -- params.StrLen_or_Ind = &handle->bind_parameter.param[i].len; +- params.StrLen_or_Ind = handle->bind_parameter.param[i].len; +- *(UINT64 *)params.StrLen_or_Ind = *StrLen_or_Ind; - if (SUCCESS((ret = ODBC_CALL( SQLBindParameter, ¶ms )))) handle->bind_parameter.param[i].ptr = StrLen_or_Ind; - TRACE("Returning %d\n", ret); return ret; @@ -2163,16 +2243,16 @@ index a3732c001be..89e4545f068 100644 - struct handle *handle = StatementHandle; - INT64 attrs; - SQLRETURN ret; -+ SQLRETURN ret = SQL_ERROR; - +- - TRACE("(StatementHandle %p, ColumnNumber %d, FieldIdentifier %d, CharacterAttributes %p, BufferLength %d, " - "StringLength %p, NumericAttributes %p)\n", StatementHandle, ColumnNumber, FieldIdentifier, - CharacterAttributes, BufferLength, StringLength, NumericAttributes); ++ SQLRETURN ret = SQL_ERROR; + +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(hstmt %p, icol %d, fDescType %d, rgbDesc %p, cbDescMax %d, pcbDesc %p, pfDesc %p)\n", hstmt, icol, + fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc); -- if (!handle) return SQL_INVALID_HANDLE; -- - params.StatementHandle = handle->unix_handle; - params.NumericAttributes = &attrs; - if (SUCCESS((ret = ODBC_CALL( SQLColAttributesW, ¶ms )))) *NumericAttributes = attrs; @@ -2188,7 +2268,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -2010,20 +1221,12 @@ SQLRETURN WINAPI SQLConnectW(SQLHDBC ConnectionHandle, WCHAR *ServerName, SQLSMA +@@ -2088,20 +1221,12 @@ SQLRETURN WINAPI SQLConnectW(SQLHDBC ConnectionHandle, WCHAR *ServerName, SQLSMA WCHAR *UserName, SQLSMALLINT NameLength2, WCHAR *Authentication, SQLSMALLINT NameLength3) { @@ -2211,7 +2291,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -2034,36 +1237,15 @@ SQLRETURN WINAPI SQLDescribeColW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNu +@@ -2112,36 +1237,15 @@ SQLRETURN WINAPI SQLDescribeColW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNu SQLSMALLINT BufferLength, SQLSMALLINT *NameLength, SQLSMALLINT *DataType, SQLULEN *ColumnSize, SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable) { @@ -2229,7 +2309,8 @@ index a3732c001be..89e4545f068 100644 BufferLength, NameLength, DataType, ColumnSize, DecimalDigits, Nullable); - if (!handle) return SQL_INVALID_HANDLE; -- ++ if (!NameLength) NameLength = &dummy; /* workaround for drivers that don't accept NULL NameLength */ + - params.StatementHandle = handle->unix_handle; - if (!NameLength) params.NameLength = &dummy; /* workaround for drivers that don't accept NULL NameLength */ - params.ColumnSize = &size; @@ -2245,13 +2326,12 @@ index a3732c001be..89e4545f068 100644 - if (DecimalDigits) TRACE("DecimalDigits %d\n", *DecimalDigits); - if (Nullable) TRACE("Nullable %d\n", *Nullable); - } -+ if (!NameLength) NameLength = &dummy; /* workaround for drivers that don't accept NULL NameLength */ - +- - TRACE("Returning %d\n", ret); return ret; } -@@ -2071,28 +1253,15 @@ SQLRETURN WINAPI SQLDescribeColW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNu +@@ -2149,28 +1253,15 @@ SQLRETURN WINAPI SQLDescribeColW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNu * SQLErrorW [ODBC32.110] */ SQLRETURN WINAPI SQLErrorW(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, SQLHSTMT StatementHandle, @@ -2268,8 +2348,7 @@ index a3732c001be..89e4545f068 100644 + FIXME("(EnvironmentHandle %p, ConnectionHandle %p, StatementHandle %p, Sqlstate %p, NativeError %p," " MessageText %p, BufferLength %d, TextLength %p)\n", EnvironmentHandle, ConnectionHandle, - StatementHandle, SqlState, NativeError, MessageText, BufferLength, TextLength); -+ StatementHandle, Sqlstate, NativeError, MessageText, BufferLength, TextLength); - +- - if (env) params.EnvironmentHandle = env->unix_handle; - if (con) params.ConnectionHandle = con->unix_handle; - if (stmt) params.StatementHandle = stmt->unix_handle; @@ -2279,12 +2358,13 @@ index a3732c001be..89e4545f068 100644 - TRACE(" Error %d\n", *NativeError); - TRACE(" MessageText %s\n", debugstr_wn(MessageText, *TextLength)); - } -- ++ StatementHandle, Sqlstate, NativeError, MessageText, BufferLength, TextLength); + - TRACE("Returning %d\n", ret); return ret; } -@@ -2101,18 +1270,11 @@ SQLRETURN WINAPI SQLErrorW(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, +@@ -2179,18 +1270,11 @@ SQLRETURN WINAPI SQLErrorW(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, */ SQLRETURN WINAPI SQLExecDirectW(SQLHSTMT StatementHandle, WCHAR *StatementText, SQLINTEGER TextLength) { @@ -2305,7 +2385,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -2122,18 +1284,11 @@ SQLRETURN WINAPI SQLExecDirectW(SQLHSTMT StatementHandle, WCHAR *StatementText, +@@ -2200,18 +1284,11 @@ SQLRETURN WINAPI SQLExecDirectW(SQLHSTMT StatementHandle, WCHAR *StatementText, SQLRETURN WINAPI SQLGetCursorNameW(SQLHSTMT StatementHandle, WCHAR *CursorName, SQLSMALLINT BufferLength, SQLSMALLINT *NameLength) { @@ -2326,7 +2406,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -2142,18 +1297,11 @@ SQLRETURN WINAPI SQLGetCursorNameW(SQLHSTMT StatementHandle, WCHAR *CursorName, +@@ -2220,18 +1297,11 @@ SQLRETURN WINAPI SQLGetCursorNameW(SQLHSTMT StatementHandle, WCHAR *CursorName, */ SQLRETURN WINAPI SQLPrepareW(SQLHSTMT StatementHandle, WCHAR *StatementText, SQLINTEGER TextLength) { @@ -2347,7 +2427,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -2162,18 +1310,11 @@ SQLRETURN WINAPI SQLPrepareW(SQLHSTMT StatementHandle, WCHAR *StatementText, SQL +@@ -2240,18 +1310,11 @@ SQLRETURN WINAPI SQLPrepareW(SQLHSTMT StatementHandle, WCHAR *StatementText, SQL */ SQLRETURN WINAPI SQLSetCursorNameW(SQLHSTMT StatementHandle, WCHAR *CursorName, SQLSMALLINT NameLength) { @@ -2368,7 +2448,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -2185,30 +1326,12 @@ SQLRETURN WINAPI SQLColAttributeW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnN +@@ -2263,30 +1326,12 @@ SQLRETURN WINAPI SQLColAttributeW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnN SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, SQLLEN *NumericAttribute) { @@ -2401,7 +2481,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -2218,18 +1341,11 @@ SQLRETURN WINAPI SQLColAttributeW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnN +@@ -2296,18 +1341,11 @@ SQLRETURN WINAPI SQLColAttributeW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnN SQLRETURN WINAPI SQLGetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { @@ -2422,7 +2502,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -2239,18 +1355,11 @@ SQLRETURN WINAPI SQLGetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribu +@@ -2317,18 +1355,11 @@ SQLRETURN WINAPI SQLGetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribu SQLRETURN WINAPI SQLGetDescFieldW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { @@ -2443,7 +2523,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -2262,22 +1371,12 @@ SQLRETURN WINAPI SQLGetDescRecW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber +@@ -2340,22 +1371,12 @@ SQLRETURN WINAPI SQLGetDescRecW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber SQLSMALLINT *SubType, SQLLEN *Length, SQLSMALLINT *Precision, SQLSMALLINT *Scale, SQLSMALLINT *Nullable) { @@ -2468,7 +2548,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -2288,43 +1387,27 @@ SQLRETURN WINAPI SQLGetDiagFieldW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLS +@@ -2366,43 +1387,27 @@ SQLRETURN WINAPI SQLGetDiagFieldW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLS SQLSMALLINT DiagIdentifier, SQLPOINTER DiagInfo, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength) { @@ -2520,7 +2600,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -2334,11 +1417,9 @@ SQLRETURN WINAPI SQLGetDiagRecW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMA +@@ -2412,11 +1417,9 @@ SQLRETURN WINAPI SQLGetDiagRecW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMA SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { @@ -2534,7 +2614,7 @@ index a3732c001be..89e4545f068 100644 Attribute, Value, BufferLength, StringLength); if (!Value) -@@ -2347,11 +1428,6 @@ SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, +@@ -2425,11 +1428,6 @@ SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, return SQL_ERROR; } @@ -2546,7 +2626,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -2361,18 +1437,11 @@ SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, +@@ -2439,18 +1437,11 @@ SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLRETURN WINAPI SQLSetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength) { @@ -2568,7 +2648,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -2383,21 +1452,14 @@ SQLRETURN WINAPI SQLColumnsW(SQLHSTMT StatementHandle, WCHAR *CatalogName, SQLSM +@@ -2461,21 +1452,14 @@ SQLRETURN WINAPI SQLColumnsW(SQLHSTMT StatementHandle, WCHAR *CatalogName, SQLSM WCHAR *SchemaName, SQLSMALLINT NameLength2, WCHAR *TableName, SQLSMALLINT NameLength3, WCHAR *ColumnName, SQLSMALLINT NameLength4) { @@ -2593,7 +2673,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -2408,21 +1470,13 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl +@@ -2486,21 +1470,13 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl SQLSMALLINT Length, WCHAR *OutConnectionString, SQLSMALLINT BufferLength, SQLSMALLINT *Length2, SQLUSMALLINT DriverCompletion) { @@ -2617,7 +2697,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -2431,17 +1485,10 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl +@@ -2509,17 +1485,10 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl */ SQLRETURN WINAPI SQLGetConnectOptionW(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLPOINTER Value) { @@ -2637,7 +2717,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -2451,18 +1498,11 @@ SQLRETURN WINAPI SQLGetConnectOptionW(SQLHDBC ConnectionHandle, SQLUSMALLINT Opt +@@ -2529,18 +1498,11 @@ SQLRETURN WINAPI SQLGetConnectOptionW(SQLHDBC ConnectionHandle, SQLUSMALLINT Opt SQLRETURN WINAPI SQLGetInfoW(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQLPOINTER InfoValue, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength) { @@ -2658,47 +2738,47 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -2471,17 +1511,10 @@ SQLRETURN WINAPI SQLGetInfoW(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQ +@@ -2549,17 +1511,10 @@ SQLRETURN WINAPI SQLGetInfoW(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQ */ SQLRETURN WINAPI SQLGetTypeInfoW(SQLHSTMT StatementHandle, SQLSMALLINT DataType) { - struct SQLGetTypeInfoW_params params = { 0, DataType }; - struct handle *handle = StatementHandle; - SQLRETURN ret; -- -- TRACE("(StatementHandle %p, DataType %d)\n", StatementHandle, DataType); + SQLRETURN ret = SQL_ERROR; -- if (!handle) return SQL_INVALID_HANDLE; +- TRACE("(StatementHandle %p, DataType %d)\n", StatementHandle, DataType); + FIXME("(StatementHandle %p, DataType %d)\n", StatementHandle, DataType); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.StatementHandle = handle->unix_handle; - ret = ODBC_CALL( SQLGetTypeInfoW, ¶ms ); - TRACE("Returning %d\n", ret); return ret; } -@@ -2490,17 +1523,10 @@ SQLRETURN WINAPI SQLGetTypeInfoW(SQLHSTMT StatementHandle, SQLSMALLINT DataType) +@@ -2568,17 +1523,10 @@ SQLRETURN WINAPI SQLGetTypeInfoW(SQLHSTMT StatementHandle, SQLSMALLINT DataType) */ SQLRETURN WINAPI SQLSetConnectOptionW(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLULEN Value) { - struct SQLSetConnectOptionW_params params = { 0, Option, Value }; - struct handle *handle = ConnectionHandle; - SQLRETURN ret; +- +- TRACE("(ConnectionHandle %p, Option %d, Value %s)\n", ConnectionHandle, Option, debugstr_sqllen(Value)); + SQLRETURN ret = SQL_ERROR; -- TRACE("(ConnectionHandle %p, Option %d, Value %s)\n", ConnectionHandle, Option, debugstr_sqllen(Value)); +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(ConnectionHandle %p, Option %d, Value %s)\n", ConnectionHandle, Option, debugstr_sqllen(Value)); -- if (!handle) return SQL_INVALID_HANDLE; -- - params.ConnectionHandle = handle->unix_handle; - ret = ODBC_CALL( SQLSetConnectOptionW, ¶ms ); - TRACE("Returning %d\n", ret); return ret; } -@@ -2512,21 +1538,13 @@ SQLRETURN WINAPI SQLSpecialColumnsW(SQLHSTMT StatementHandle, SQLUSMALLINT Ident +@@ -2590,21 +1538,13 @@ SQLRETURN WINAPI SQLSpecialColumnsW(SQLHSTMT StatementHandle, SQLUSMALLINT Ident SQLSMALLINT NameLength2, SQLWCHAR *TableName, SQLSMALLINT NameLength3, SQLUSMALLINT Scope, SQLUSMALLINT Nullable) { @@ -2722,7 +2802,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -2537,21 +1555,13 @@ SQLRETURN WINAPI SQLStatisticsW(SQLHSTMT StatementHandle, SQLWCHAR *CatalogName, +@@ -2615,21 +1555,13 @@ SQLRETURN WINAPI SQLStatisticsW(SQLHSTMT StatementHandle, SQLWCHAR *CatalogName, SQLWCHAR *SchemaName, SQLSMALLINT NameLength2, SQLWCHAR *TableName, SQLSMALLINT NameLength3, SQLUSMALLINT Unique, SQLUSMALLINT Reserved) { @@ -2746,7 +2826,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -2562,71 +1572,47 @@ SQLRETURN WINAPI SQLTablesW(SQLHSTMT StatementHandle, SQLWCHAR *CatalogName, SQL +@@ -2640,71 +1572,47 @@ SQLRETURN WINAPI SQLTablesW(SQLHSTMT StatementHandle, SQLWCHAR *CatalogName, SQL SQLWCHAR *SchemaName, SQLSMALLINT NameLength2, SQLWCHAR *TableName, SQLSMALLINT NameLength3, SQLWCHAR *TableType, SQLSMALLINT NameLength4) { @@ -2836,7 +2916,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -2637,215 +1623,136 @@ SQLRETURN WINAPI SQLDataSourcesW(SQLHENV EnvironmentHandle, SQLUSMALLINT Directi +@@ -2715,215 +1623,136 @@ SQLRETURN WINAPI SQLDataSourcesW(SQLHENV EnvironmentHandle, SQLUSMALLINT Directi SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1, WCHAR *Description, SQLSMALLINT BufferLength2, SQLSMALLINT *NameLength2) { @@ -2888,8 +2968,7 @@ index a3732c001be..89e4545f068 100644 - FkSchemaName, NameLength5, FkTableName, NameLength6 }; - struct handle *handle = StatementHandle; - SQLRETURN ret; -+ SQLRETURN ret = SQL_ERROR; - +- - TRACE("(StatementHandle %p, PkCatalogName %s, NameLength1 %d, PkSchemaName %s, NameLength2 %d," - " PkTableName %s, NameLength3 %d, FkCatalogName %s, NameLength4 %d, FkSchemaName %s," - " NameLength5 %d, FkTableName %s, NameLength6 %d)\n", StatementHandle, @@ -2899,6 +2978,9 @@ index a3732c001be..89e4545f068 100644 - debugstr_wn(FkCatalogName, NameLength4), NameLength4, - debugstr_wn(FkSchemaName, NameLength5), NameLength5, - debugstr_wn(FkTableName, NameLength6), NameLength6); ++ SQLRETURN ret = SQL_ERROR; + +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(hstmt %p, szPkCatalogName %s, cbPkCatalogName %d, szPkSchemaName %s, cbPkSchemaName %d," + " szPkTableName %s, cbPkTableName %d, szFkCatalogName %s, cbFkCatalogName %d, szFkSchemaName %s," + " cbFkSchemaName %d, szFkTableName %s, cbFkTableName %d)\n", hstmt, @@ -2909,8 +2991,6 @@ index a3732c001be..89e4545f068 100644 + debugstr_wn(szFkSchemaName, cbFkSchemaName), cbFkSchemaName, + debugstr_wn(szFkTableName, cbFkTableName), cbFkTableName); -- if (!handle) return SQL_INVALID_HANDLE; -- - params.StatementHandle = handle->unix_handle; - ret = ODBC_CALL( SQLForeignKeysW, ¶ms ); - TRACE("Returning %d\n", ret); @@ -2929,16 +3009,16 @@ index a3732c001be..89e4545f068 100644 - TextLength2 }; - struct handle *handle = ConnectionHandle; - SQLRETURN ret; -- ++ SQLRETURN ret = SQL_ERROR; + - TRACE("(ConnectionHandle %p, InStatementText %s, TextLength1 %d, OutStatementText %p, BufferLength %d, " - "TextLength2 %p)\n", ConnectionHandle, debugstr_wn(InStatementText, TextLength1), TextLength1, - OutStatementText, BufferLength, TextLength2); -+ SQLRETURN ret = SQL_ERROR; - -- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(hdbc %p, szSqlStrIn %s, cbSqlStrIn %d, szSqlStr %p, cbSqlStrMax %d, pcbSqlStr %p)\n", hdbc, + debugstr_wn(szSqlStrIn, cbSqlStrIn), cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.ConnectionHandle = handle->unix_handle; - ret = ODBC_CALL( SQLNativeSqlW, ¶ms ); - TRACE("Returning %d\n", ret); @@ -2994,15 +3074,15 @@ index a3732c001be..89e4545f068 100644 - ProcName, NameLength3, ColumnName, NameLength4 }; - struct handle *handle = StatementHandle; - SQLRETURN ret; -+ SQLRETURN ret = SQL_ERROR; - +- - TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d, ProcName %s," - " NameLength3 %d, ColumnName %s, NameLength4 %d)\n", StatementHandle, - debugstr_wn(CatalogName, NameLength1), NameLength1, - debugstr_wn(SchemaName, NameLength2), NameLength2, - debugstr_wn(ProcName, NameLength3), NameLength3, - debugstr_wn(ColumnName, NameLength4), NameLength4); -- ++ SQLRETURN ret = SQL_ERROR; + - if (!handle) return SQL_INVALID_HANDLE; + FIXME("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szProcName %s," + " cbProcName %d, szColumnName %s, cbColumnName %d)\n", hstmt, @@ -3100,22 +3180,22 @@ index a3732c001be..89e4545f068 100644 - DriverDescription, BufferLength1, DescriptionLength, DriverAttributes, BufferLength2, AttributesLength); - - if (!handle) return SQL_INVALID_HANDLE; -- -- params.EnvironmentHandle = handle->unix_handle; -- ret = ODBC_CALL( SQLDriversW, ¶ms ); + SQLRETURN ret = SQL_NO_DATA; -- if (ret == SQL_NO_DATA && Direction == SQL_FETCH_FIRST) -- ERR_(winediag)("No ODBC drivers could be found. Check the settings for your libodbc provider.\n"); +- params.EnvironmentHandle = handle->unix_handle; +- ret = ODBC_CALL( SQLDriversW, ¶ms ); + FIXME("(EnvironmentHandle %p, Direction %d, szDriverDesc %p, cbDriverDescMax %d, pcbDriverDesc %p," + " DriverAttributes %p, cbDriverAttrMax %d, pcbDriverAttr %p)\n", EnvironmentHandle, fDirection, + szDriverDesc, cbDriverDescMax, pcbDriverDesc, szDriverAttributes, cbDriverAttrMax, pcbDriverAttr); +- if (ret == SQL_NO_DATA && Direction == SQL_FETCH_FIRST) +- ERR_(winediag)("No ODBC drivers could be found. Check the settings for your libodbc provider.\n"); +- - TRACE("Returning %d\n", ret); return ret; } -@@ -2855,18 +1762,11 @@ SQLRETURN WINAPI SQLDriversW(SQLHENV EnvironmentHandle, SQLUSMALLINT Direction, +@@ -2933,18 +1762,11 @@ SQLRETURN WINAPI SQLDriversW(SQLHENV EnvironmentHandle, SQLUSMALLINT Direction, SQLRETURN WINAPI SQLSetDescFieldW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength) { @@ -3136,7 +3216,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -2876,24 +1776,11 @@ SQLRETURN WINAPI SQLSetDescFieldW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumb +@@ -2954,28 +1776,11 @@ SQLRETURN WINAPI SQLSetDescFieldW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumb SQLRETURN WINAPI SQLSetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength) { @@ -3146,16 +3226,20 @@ index a3732c001be..89e4545f068 100644 - - TRACE("(StatementHandle %p, Attribute %d, Value %p, StringLength %d)\n", StatementHandle, Attribute, - Value, StringLength); +- +- if (!handle) return SQL_INVALID_HANDLE; + SQLRETURN ret = SQL_ERROR; -- if (!handle) return SQL_INVALID_HANDLE; -- - params.StatementHandle = handle->unix_handle; -- ret = ODBC_CALL( SQLSetStmtAttrW, ¶ms ); -- if (ret == SQL_ERROR && (Attribute == SQL_ROWSET_SIZE || Attribute == SQL_ATTR_ROW_ARRAY_SIZE)) +- if (SUCCESS((ret = ODBC_CALL( SQLSetStmtAttrW, ¶ms )))) - { -- TRACE("CHEAT: returning SQL_SUCCESS to ADO\n"); -- return SQL_SUCCESS; +- SQLULEN row_count = (SQLULEN)Value; +- if (Attribute == SQL_ATTR_ROW_ARRAY_SIZE && row_count != handle->row_count) +- { +- TRACE( "resizing result length array\n" ); +- if (!resize_result_lengths( handle, row_count )) ret = SQL_ERROR; +- else handle->row_count = row_count; +- } - } + FIXME("(StatementHandle %p, Attribute %d, Value %p, StringLength %d)\n", StatementHandle, Attribute, Value, + StringLength); @@ -3164,7 +3248,7 @@ index a3732c001be..89e4545f068 100644 return ret; } -@@ -2901,33 +1788,14 @@ SQLRETURN WINAPI SQLSetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, +@@ -2983,34 +1788,14 @@ SQLRETURN WINAPI SQLSetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, * SQLGetDiagRecA [ODBC32.236] */ SQLRETURN WINAPI SQLGetDiagRecA(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, @@ -3175,15 +3259,15 @@ index a3732c001be..89e4545f068 100644 - return SQLGetDiagRec( HandleType, Handle, RecNumber, SqlState, NativeError, MessageText, BufferLength, - TextLength ); -} -- ++ SQLRETURN ret = SQL_ERROR; + -/*********************************************************************** - * DllMain [Internal] Initializes the internal 'ODBC32.DLL'. - */ -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID reserved) -{ - TRACE("proxy ODBC: %p,%lx,%p\n", hinstDLL, reason, reserved); -+ SQLRETURN ret = SQL_ERROR; - +- - switch (reason) - { - case DLL_PROCESS_ATTACH: @@ -3192,6 +3276,7 @@ index a3732c001be..89e4545f068 100644 - { - if (WINE_UNIX_CALL( process_attach, NULL )) __wine_unixlib_handle = 0; - } +- IsWow64Process( GetCurrentProcess(), &is_wow64 ); - break; - - case DLL_PROCESS_DETACH: @@ -3206,7 +3291,7 @@ index a3732c001be..89e4545f068 100644 } diff --git a/dlls/odbc32/unixlib.c b/dlls/odbc32/unixlib.c deleted file mode 100644 -index dbc0da8d274..00000000000 +index cc963c5a893..00000000000 --- a/dlls/odbc32/unixlib.c +++ /dev/null @@ -1,3673 +0,0 @@ @@ -3580,7 +3665,7 @@ index dbc0da8d274..00000000000 -{ - struct SQLBindCol_params *params = args; - return SQLBindCol( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, params->TargetType, -- params->TargetValue, params->BufferLength, (SQLLEN *)(ULONG_PTR)params->StrLen_or_Ind ); +- params->TargetValue, params->BufferLength, params->StrLen_or_Ind ); -} - -static NTSTATUS wrap_SQLBindParam( void *args ) @@ -3588,7 +3673,7 @@ index dbc0da8d274..00000000000 - struct SQLBindParam_params *params = args; - return SQLBindParam( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ParameterNumber, params->ValueType, - params->ParameterType, params->LengthPrecision, params->ParameterScale, -- params->ParameterValue, (SQLLEN *)(ULONG_PTR)params->StrLen_or_Ind ); +- params->ParameterValue, params->StrLen_or_Ind ); -} - -static NTSTATUS wrap_SQLBindParameter( void *args ) @@ -3597,7 +3682,7 @@ index dbc0da8d274..00000000000 - return SQLBindParameter( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ParameterNumber, - params->InputOutputType, params->ValueType, params->ParameterType, params->ColumnSize, - params->DecimalDigits, params->ParameterValue, params->BufferLength, -- (SQLLEN *)(ULONG_PTR)params->StrLen_or_Ind ); +- params->StrLen_or_Ind ); -} - -static NTSTATUS wrap_SQLBrowseConnect( void *args ) @@ -6885,10 +6970,10 @@ index dbc0da8d274..00000000000 -#endif /* _WIN64 */ diff --git a/dlls/odbc32/unixlib.h b/dlls/odbc32/unixlib.h deleted file mode 100644 -index ed5f0129fd2..00000000000 +index c021eb22c50..00000000000 --- a/dlls/odbc32/unixlib.h +++ /dev/null -@@ -1,1256 +0,0 @@ +@@ -1,1257 +0,0 @@ -/* - * Win32 ODBC functions - * @@ -6920,7 +7005,7 @@ index ed5f0129fd2..00000000000 -#include "winbase.h" -#include "wine/unixlib.h" - --#define SUCCESS(ret) (ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO) +-static inline BOOL SUCCESS( SQLRETURN ret ) { return ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO; } - -enum sql_funcs -{ @@ -7045,8 +7130,8 @@ index ed5f0129fd2..00000000000 - -struct param -{ -- INT64 len; /* result length stored in Unix lib */ -- void *ptr; /* result length ptr passed by client */ +- UINT8 *len; /* result length array stored in Unix lib */ +- void *ptr; /* result length ptr passed by client */ -}; - -struct param_binding @@ -7061,6 +7146,7 @@ index ed5f0129fd2..00000000000 - struct param_binding bind_col; - struct param_binding bind_param; - struct param_binding bind_parameter; +- UINT32 row_count; /* number of rows returned by SQLFetch() */ -}; - -struct SQLAllocConnect_params @@ -7101,7 +7187,7 @@ index ed5f0129fd2..00000000000 - INT16 TargetType; - void *TargetValue; - INT64 BufferLength; -- INT64 *StrLen_or_Ind; +- void *StrLen_or_Ind; -}; - -struct SQLBindParam_params @@ -7113,7 +7199,7 @@ index ed5f0129fd2..00000000000 - UINT64 LengthPrecision; - INT16 ParameterScale; - void *ParameterValue; -- INT64 *StrLen_or_Ind; +- void *StrLen_or_Ind; -}; - -struct SQLBindParameter_params @@ -7127,7 +7213,7 @@ index ed5f0129fd2..00000000000 - INT16 DecimalDigits; - void *ParameterValue; - INT64 BufferLength; -- INT64 *StrLen_or_Ind; +- void *StrLen_or_Ind; -}; - -struct SQLBrowseConnect_params diff --git a/staging/upstream-commit b/staging/upstream-commit index d3fad64a..5a50357b 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -8ba51a6f711c5466e060a5958cc15c31b2b2ac7d +0bc571657e63b478fb5913b90343a8ec39443b82