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
8a8c561c
Commit
8a8c561c
authored
Aug 29, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Aug 29, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- the combination of all table keys must be unique, not each key
- MsiViewExecute may not be called before MsiModifyView
parent
9a03000e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
table.c
dlls/msi/table.c
+18
-6
No files found.
dlls/msi/table.c
View file @
8a8c561c
...
...
@@ -1326,6 +1326,7 @@ static UINT table_validate_new( MSITABLEVIEW *tv, MSIRECORD *rec )
{
LPCWSTR
str
;
UINT
i
,
val
,
r
,
row
;
BOOL
has_key
=
FALSE
;
/* FIXME: set the MsiViewGetError value */
...
...
@@ -1335,6 +1336,8 @@ static UINT table_validate_new( MSITABLEVIEW *tv, MSIRECORD *rec )
if
(
!
(
tv
->
columns
[
i
].
type
&
MSITYPE_KEY
)
)
continue
;
has_key
=
TRUE
;
TRACE
(
"column %d (%s.%s)is a key
\n
"
,
i
,
debugstr_w
(
tv
->
columns
[
i
].
tablename
),
debugstr_w
(
tv
->
columns
[
i
].
colname
)
);
...
...
@@ -1350,7 +1353,7 @@ static UINT table_validate_new( MSITABLEVIEW *tv, MSIRECORD *rec )
/* if the string doesn't exist in the string table yet, it's OK */
r
=
msi_string2idW
(
tv
->
db
->
strings
,
str
,
&
val
);
if
(
ERROR_SUCCESS
!=
r
)
continue
;
return
ERROR_SUCCESS
;
}
else
{
...
...
@@ -1361,13 +1364,15 @@ static UINT table_validate_new( MSITABLEVIEW *tv, MSIRECORD *rec )
/* if we find the same value in the table, it's a duplicate */
row
=
0
;
r
=
table_find_in_column
(
tv
,
i
+
1
,
val
,
&
row
);
if
(
ERROR_SUCCESS
==
r
)
{
TRACE
(
"found in row %d
\n
"
,
row
);
return
ERROR_INVALID_DATA
;
}
if
(
ERROR_SUCCESS
!=
r
)
return
ERROR_SUCCESS
;
TRACE
(
"found in row %d
\n
"
,
row
);
}
if
(
has_key
)
return
ERROR_INVALID_DATA
;
return
ERROR_SUCCESS
;
}
...
...
@@ -1418,6 +1423,13 @@ static UINT TABLE_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode,
TRACE
(
"%p %d %p
\n
"
,
view
,
eModifyMode
,
rec
);
if
(
!
tv
->
table
)
{
r
=
TABLE_execute
(
view
,
NULL
);
if
(
r
)
return
r
;
}
switch
(
eModifyMode
)
{
case
MSIMODIFY_VALIDATE_NEW
:
...
...
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