https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5f1570f47d86a76014fad…
commit 5f1570f47d86a76014fad532646bf35e9c031bcb
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sun Mar 13 00:16:39 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:28:11 2022 +0100
[WINESYNC] msi: Don't check the primary keys when handling MSIMODIFY_DELETE.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id 96b6d6b58725f17f3faabeeffe82d2b8bd5f0445 by Zebediah Figura
<z.figura12(a)gmail.com>
---
dll/win32/msi/table.c | 14 +-------------
modules/rostests/winetests/msi/db.c | 1 +
2 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/dll/win32/msi/table.c b/dll/win32/msi/table.c
index a2b83e27de2..57114baa749 100644
--- a/dll/win32/msi/table.c
+++ b/dll/win32/msi/table.c
@@ -1835,18 +1835,6 @@ static UINT msi_table_assign(struct tagMSIVIEW *view, MSIRECORD
*rec)
return TABLE_insert_row( view, rec, -1, FALSE );
}
-static UINT modify_delete_row( struct tagMSIVIEW *view, MSIRECORD *rec )
-{
- MSITABLEVIEW *tv = (MSITABLEVIEW *)view;
- UINT row, r;
-
- r = msi_table_find_row(tv, rec, &row, NULL);
- if (r != ERROR_SUCCESS)
- return r;
-
- return TABLE_delete_row(view, row);
-}
-
static UINT msi_refresh_record( struct tagMSIVIEW *view, MSIRECORD *rec, UINT row )
{
MSIRECORD *curr;
@@ -1878,7 +1866,7 @@ static UINT TABLE_modify( struct tagMSIVIEW *view, MSIMODIFY
eModifyMode,
switch (eModifyMode)
{
case MSIMODIFY_DELETE:
- r = modify_delete_row( view, rec );
+ r = TABLE_delete_row( view, row );
break;
case MSIMODIFY_VALIDATE_NEW:
r = table_validate_new( tv, rec, &column );
diff --git a/modules/rostests/winetests/msi/db.c b/modules/rostests/winetests/msi/db.c
index cbdfd3ce7de..e8ae8d21d3c 100644
--- a/modules/rostests/winetests/msi/db.c
+++ b/modules/rostests/winetests/msi/db.c
@@ -5498,6 +5498,7 @@ static void test_viewmodify_delete(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
/* delete 2 */
+ MsiRecordSetInteger(hrec, 1, 4);
r = MsiViewModify(hview, MSIMODIFY_DELETE, hrec);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);