From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
--- dlls/msado15/recordset.c | 16 ++++++++++++---- dlls/msado15/tests/msado15.c | 16 ++++++++++++++++ 2 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/dlls/msado15/recordset.c b/dlls/msado15/recordset.c index 36938db88cc..1b1c033320a 100644 --- a/dlls/msado15/recordset.c +++ b/dlls/msado15/recordset.c @@ -50,6 +50,7 @@ struct recordset CursorTypeEnum cursor_type; IRowset *row_set; EditModeEnum editmode; + LONG cache_size; VARIANT filter;
DBTYPE *columntypes; @@ -1449,14 +1450,20 @@ static HRESULT WINAPI recordset_put_Bookmark( _Recordset *iface, VARIANT bookmar
static HRESULT WINAPI recordset_get_CacheSize( _Recordset *iface, LONG *size ) { - FIXME( "%p, %p\n", iface, size ); - return E_NOTIMPL; + struct recordset *recordset = impl_from_Recordset( iface ); + TRACE( "%p, %p\n", iface, size ); + + *size = recordset->cache_size; + return S_OK; }
static HRESULT WINAPI recordset_put_CacheSize( _Recordset *iface, LONG size ) { - FIXME( "%p, %ld\n", iface, size ); - return E_NOTIMPL; + struct recordset *recordset = impl_from_Recordset( iface ); + TRACE( "%p, %ld\n", iface, size ); + + recordset->cache_size = size; + return S_OK; }
static HRESULT WINAPI recordset_get_CursorType( _Recordset *iface, CursorTypeEnum *cursor_type ) @@ -2792,6 +2799,7 @@ HRESULT Recordset_create( void **obj ) recordset->cursor_type = adOpenForwardOnly; recordset->row_set = NULL; recordset->editmode = adEditNone; + recordset->cache_size = 1; VariantInit( &recordset->filter ); recordset->columntypes = NULL; recordset->haccessors = NULL; diff --git a/dlls/msado15/tests/msado15.c b/dlls/msado15/tests/msado15.c index 9c9afbc120f..45dbf2c2239 100644 --- a/dlls/msado15/tests/msado15.c +++ b/dlls/msado15/tests/msado15.c @@ -61,6 +61,7 @@ static void test_Recordset(void) HRESULT hr; VARIANT bookmark, filter, active; EditModeEnum editmode; + LONG cache_size;
hr = CoCreateInstance( &CLSID_Recordset, NULL, CLSCTX_INPROC_SERVER, &IID__Recordset, (void **)&recordset ); ok( hr == S_OK, "got %08lx\n", hr ); @@ -111,6 +112,21 @@ static void test_Recordset(void) ok( hr == S_OK, "got %08lx\n", hr ); ok( cursor == adOpenForwardOnly, "got %d\n", cursor );
+ cache_size = 0; + hr = _Recordset_get_CacheSize( recordset, &cache_size ); + ok( hr == S_OK, "got %08lx\n", hr ); + ok( cache_size == 1, "got %ld\n", cache_size ); + + hr = _Recordset_put_CacheSize( recordset, 5 ); + ok( hr == S_OK, "got %08lx\n", hr ); + + hr = _Recordset_get_CacheSize( recordset, &cache_size ); + ok( hr == S_OK, "got %08lx\n", hr ); + ok( cache_size == 5, "got %ld\n", cache_size ); + + hr = _Recordset_put_CacheSize( recordset, 1 ); + ok( hr == S_OK, "got %08lx\n", hr ); + editmode = -1; hr = _Recordset_get_EditMode( recordset, &editmode ); ok( hr == MAKE_ADO_HRESULT( adErrObjectClosed ), "got %08lx\n", hr );
From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
--- dlls/msado15/recordset.c | 16 ++++++++++++---- dlls/msado15/tests/msado15.c | 17 ++++++++++++++++- 2 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/dlls/msado15/recordset.c b/dlls/msado15/recordset.c index 1b1c033320a..74558ac02f8 100644 --- a/dlls/msado15/recordset.c +++ b/dlls/msado15/recordset.c @@ -51,6 +51,7 @@ struct recordset IRowset *row_set; EditModeEnum editmode; LONG cache_size; + ADO_LONGPTR max_records; VARIANT filter;
DBTYPE *columntypes; @@ -1532,14 +1533,20 @@ static HRESULT WINAPI recordset_put_LockType( _Recordset *iface, LockTypeEnum lo
static HRESULT WINAPI recordset_get_MaxRecords( _Recordset *iface, ADO_LONGPTR *max_records ) { - FIXME( "%p, %p\n", iface, max_records ); - return E_NOTIMPL; + struct recordset *recordset = impl_from_Recordset( iface ); + TRACE( "%p, %p\n", iface, max_records ); + + *max_records = recordset->max_records; + return S_OK; }
static HRESULT WINAPI recordset_put_MaxRecords( _Recordset *iface, ADO_LONGPTR max_records ) { - FIXME( "%p, %Id\n", iface, max_records ); - return E_NOTIMPL; + struct recordset *recordset = impl_from_Recordset( iface ); + TRACE( "%p, %Id\n", iface, max_records ); + + recordset->max_records = max_records; + return S_OK; }
static HRESULT WINAPI recordset_get_RecordCount( _Recordset *iface, ADO_LONGPTR *count ) @@ -2800,6 +2807,7 @@ HRESULT Recordset_create( void **obj ) recordset->row_set = NULL; recordset->editmode = adEditNone; recordset->cache_size = 1; + recordset->max_records = 1; VariantInit( &recordset->filter ); recordset->columntypes = NULL; recordset->haccessors = NULL; diff --git a/dlls/msado15/tests/msado15.c b/dlls/msado15/tests/msado15.c index 45dbf2c2239..b6c1c391e71 100644 --- a/dlls/msado15/tests/msado15.c +++ b/dlls/msado15/tests/msado15.c @@ -53,7 +53,7 @@ static void test_Recordset(void) Properties *props; Property *prop; LONG count, state; - ADO_LONGPTR rec_count; + ADO_LONGPTR rec_count, max_records; VARIANT missing, val, index; CursorLocationEnum location; CursorTypeEnum cursor; @@ -127,6 +127,21 @@ static void test_Recordset(void) hr = _Recordset_put_CacheSize( recordset, 1 ); ok( hr == S_OK, "got %08lx\n", hr );
+ max_records = 0; + hr = _Recordset_get_MaxRecords( recordset, &max_records ); + ok( hr == S_OK, "got %08lx\n", hr ); + ok( max_records == 0, "got %Id\n", max_records ); + + hr = _Recordset_put_MaxRecords( recordset, 5 ); + ok( hr == S_OK, "got %08lx\n", hr ); + + hr = _Recordset_get_MaxRecords( recordset, &max_records ); + ok( hr == S_OK, "got %08lx\n", hr ); + ok( max_records == 5, "got %Id\n", max_records ); + + hr = _Recordset_put_MaxRecords( recordset, 0 ); + ok( hr == S_OK, "got %08lx\n", hr ); + editmode = -1; hr = _Recordset_get_EditMode( recordset, &editmode ); ok( hr == MAKE_ADO_HRESULT( adErrObjectClosed ), "got %08lx\n", hr );
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=146516
Your paranoid android.
=== debian11 (32 bit report) ===
msado15: msado15.c:133: Test failed: got 1
=== debian11 (32 bit ar:MA report) ===
msado15: msado15.c:133: Test failed: got 1
=== debian11 (32 bit de report) ===
msado15: msado15.c:133: Test failed: got 1
=== debian11 (32 bit fr report) ===
msado15: msado15.c:133: Test failed: got 1
=== debian11 (32 bit he:IL report) ===
msado15: msado15.c:133: Test failed: got 1
=== debian11 (32 bit hi:IN report) ===
msado15: msado15.c:133: Test failed: got 1
=== debian11 (32 bit ja:JP report) ===
msado15: msado15.c:133: Test failed: got 1
=== debian11 (32 bit zh:CN report) ===
msado15: msado15.c:133: Test failed: got 1
=== debian11b (32 bit WoW report) ===
msado15: msado15.c:133: Test failed: got 1
=== debian11b (64 bit WoW report) ===
msado15: msado15.c:133: Test failed: got 1