Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
342fcb61
Commit
342fcb61
authored
Mar 19, 2012
by
Andoni Morales Alastruey
Committed by
Alexandre Julliard
Mar 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Implement MSIMODIFY_MERGE function in TABLE_modify.
parent
e08a7a61
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
2 deletions
+36
-2
table.c
dlls/msi/table.c
+12
-2
db.c
dlls/msi/tests/db.c
+24
-0
No files found.
dlls/msi/table.c
View file @
342fcb61
...
...
@@ -1766,7 +1766,7 @@ static UINT TABLE_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode,
MSIRECORD
*
rec
,
UINT
row
)
{
MSITABLEVIEW
*
tv
=
(
MSITABLEVIEW
*
)
view
;
UINT
r
,
column
;
UINT
r
,
frow
,
column
;
TRACE
(
"%p %d %p
\n
"
,
view
,
eModifyMode
,
rec
);
...
...
@@ -1811,8 +1811,18 @@ static UINT TABLE_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode,
r
=
msi_table_assign
(
view
,
rec
);
break
;
case
MSIMODIFY_REPLACE
:
case
MSIMODIFY_MERGE
:
/* check row that matches this record */
r
=
msi_table_find_row
(
tv
,
rec
,
&
frow
,
&
column
);
if
(
r
!=
ERROR_SUCCESS
)
{
r
=
table_validate_new
(
tv
,
rec
,
NULL
);
if
(
r
==
ERROR_SUCCESS
)
r
=
TABLE_insert_row
(
view
,
rec
,
-
1
,
FALSE
);
}
break
;
case
MSIMODIFY_REPLACE
:
case
MSIMODIFY_VALIDATE
:
case
MSIMODIFY_VALIDATE_FIELD
:
case
MSIMODIFY_VALIDATE_DELETE
:
...
...
dlls/msi/tests/db.c
View file @
342fcb61
...
...
@@ -923,6 +923,30 @@ static void test_viewmodify(void)
r
=
MsiViewModify
(
hview
,
MSIMODIFY_INSERT_TEMPORARY
,
hrec
);
ok
(
r
==
ERROR_FUNCTION_FAILED
,
"MsiViewModify failed
\n
"
);
/* try to merge the same record */
r
=
MsiViewExecute
(
hview
,
0
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewExecute failed
\n
"
);
r
=
MsiViewModify
(
hview
,
MSIMODIFY_MERGE
,
hrec
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewModify failed
\n
"
);
r
=
MsiCloseHandle
(
hrec
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to close record
\n
"
);
/* try merging a new record */
hrec
=
MsiCreateRecord
(
3
);
r
=
MsiRecordSetInteger
(
hrec
,
1
,
10
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to set integer
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"pepe"
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to set string
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"7654321"
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to set string
\n
"
);
r
=
MsiViewModify
(
hview
,
MSIMODIFY_MERGE
,
hrec
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewModify failed
\n
"
);
r
=
MsiViewExecute
(
hview
,
0
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewExecute failed
\n
"
);
r
=
MsiCloseHandle
(
hrec
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to close record
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment