Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
4b75f330
Commit
4b75f330
authored
Jan 09, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Jan 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Actually delete the row data instead of blanking it out.
parent
419a8a24
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
20 deletions
+34
-20
delete.c
dlls/msi/delete.c
+2
-9
table.c
dlls/msi/table.c
+7
-0
db.c
dlls/msi/tests/db.c
+4
-10
where.c
dlls/msi/where.c
+21
-1
No files found.
dlls/msi/delete.c
View file @
4b75f330
...
...
@@ -77,7 +77,6 @@ static UINT DELETE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
{
MSIDELETEVIEW
*
dv
=
(
MSIDELETEVIEW
*
)
view
;
UINT
r
,
i
,
rows
=
0
,
cols
=
0
;
MSIRECORD
*
empty
;
TRACE
(
"%p %p
\n
"
,
dv
,
record
);
...
...
@@ -92,17 +91,11 @@ static UINT DELETE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
TRACE
(
"blanking %d rows
\n
"
,
rows
);
empty
=
MSI_CreateRecord
(
cols
);
if
(
!
empty
)
return
ERROR_FUNCTION_FAILED
;
TRACE
(
"deleting %d rows
\n
"
,
rows
);
/* blank out all the rows that match */
for
(
i
=
0
;
i
<
rows
;
i
++
)
dv
->
table
->
ops
->
set_row
(
dv
->
table
,
i
,
empty
,
(
1
<<
cols
)
-
1
);
msiobj_release
(
&
empty
->
hdr
);
dv
->
table
->
ops
->
delete_row
(
dv
->
table
,
i
);
return
ERROR_SUCCESS
;
}
...
...
dlls/msi/table.c
View file @
4b75f330
...
...
@@ -1572,6 +1572,13 @@ static UINT TABLE_delete_row( struct tagMSIVIEW *view, UINT row )
data
=
tv
->
table
->
nonpersistent_data
;
}
/* reset the hash tables */
for
(
i
=
0
;
i
<
tv
->
num_cols
;
i
++
)
{
msi_free
(
tv
->
columns
[
i
].
hash_table
);
tv
->
columns
[
i
].
hash_table
=
NULL
;
}
if
(
row
==
num_rows
-
1
)
return
ERROR_SUCCESS
;
...
...
dlls/msi/tests/db.c
View file @
4b75f330
...
...
@@ -4991,7 +4991,7 @@ static void test_viewmodify_delete_temporary(void)
DeleteFileA
(
msifile
);
}
static
void
test_
msidatabasecommit
()
static
void
test_
deleterow
()
{
MSIHANDLE
hdb
,
hview
,
hrec
;
const
char
*
query
;
...
...
@@ -5040,18 +5040,12 @@ static void test_msidatabasecommit()
size
=
MAX_PATH
;
r
=
MsiRecordGetStringA
(
hrec
,
1
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
todo_wine
{
ok
(
!
lstrcmpA
(
buf
,
"two"
),
"Expected two, got %s
\n
"
,
buf
);
}
ok
(
!
lstrcmpA
(
buf
,
"two"
),
"Expected two, got %s
\n
"
,
buf
);
MsiCloseHandle
(
hrec
);
r
=
MsiViewFetch
(
hview
,
&
hrec
);
todo_wine
{
ok
(
r
==
ERROR_NO_MORE_ITEMS
,
"Expected ERROR_NO_MORE_ITEMS, got %d
\n
"
,
r
);
}
ok
(
r
==
ERROR_NO_MORE_ITEMS
,
"Expected ERROR_NO_MORE_ITEMS, got %d
\n
"
,
r
);
MsiViewClose
(
hview
);
MsiCloseHandle
(
hview
);
...
...
@@ -5089,5 +5083,5 @@ START_TEST(db)
test_defaultdatabase
();
test_order
();
test_viewmodify_delete_temporary
();
test_
msidatabasecommit
();
test_
deleterow
();
}
dlls/msi/where.c
View file @
4b75f330
...
...
@@ -200,6 +200,26 @@ static UINT WHERE_set_row( struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, UI
return
wv
->
table
->
ops
->
set_row
(
wv
->
table
,
row
,
rec
,
mask
);
}
static
UINT
WHERE_delete_row
(
struct
tagMSIVIEW
*
view
,
UINT
row
)
{
MSIWHEREVIEW
*
wv
=
(
MSIWHEREVIEW
*
)
view
;
UINT
r
;
TRACE
(
"(%p %d)
\n
"
,
view
,
row
);
if
(
!
wv
->
table
)
return
ERROR_FUNCTION_FAILED
;
if
(
row
>
wv
->
row_count
)
return
ERROR_NO_MORE_ITEMS
;
r
=
find_entry_in_hash
(
wv
->
reorder
,
row
,
&
row
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
return
wv
->
table
->
ops
->
delete_row
(
wv
->
table
,
row
);
}
static
INT
INT_evaluate_binary
(
INT
lval
,
UINT
op
,
INT
rval
)
{
switch
(
op
)
...
...
@@ -549,7 +569,7 @@ static const MSIVIEWOPS where_ops =
WHERE_get_row
,
WHERE_set_row
,
NULL
,
NULL
,
WHERE_delete_row
,
WHERE_execute
,
WHERE_close
,
WHERE_get_dimensions
,
...
...
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