From 46ec7ee183129cc1099a001febc5e77225ecacfb Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Wed, 17 Oct 2007 22:53:54 -0500 Subject: [PATCH] msi: Return ERROR_FUNCTION_FAILED when inserting duplicate keys. --- dlls/msi/table.c | 2 +- dlls/msi/tests/db.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/dlls/msi/table.c b/dlls/msi/table.c index c5850e3189..692f4a5884 100644 --- a/dlls/msi/table.c +++ b/dlls/msi/table.c @@ -1490,7 +1490,7 @@ static UINT table_validate_new( MSITABLEVIEW *tv, MSIRECORD *rec ) /* check there's no duplicate keys */ r = msi_table_find_row( tv, rec, &row ); if (r == ERROR_SUCCESS) - return ERROR_INVALID_DATA; + return ERROR_FUNCTION_FAILED; return ERROR_SUCCESS; } diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c index 293cf0cf9f..8887954ed2 100644 --- a/dlls/msi/tests/db.c +++ b/dlls/msi/tests/db.c @@ -791,10 +791,8 @@ static void test_viewmodify(void) ok(r == ERROR_SUCCESS, "MsiViewExecute failed\n"); /* should fail ... */ - todo_wine { r = MsiViewModify(hview, MSIMODIFY_INSERT_TEMPORARY, hrec ); ok(r == ERROR_FUNCTION_FAILED, "MsiViewModify failed\n"); - } r = MsiCloseHandle(hrec); ok(r == ERROR_SUCCESS, "failed to close record\n");