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
eef54ffe
Commit
eef54ffe
authored
Aug 27, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Aug 27, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Open the database storage in transacted mode when MSIDBOPEN_CREATE or…
msi: Open the database storage in transacted mode when MSIDBOPEN_CREATE or MSIDBOPEN_TRANSACT is specified.
parent
d411c49d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
9 deletions
+28
-9
database.c
dlls/msi/database.c
+20
-8
table.c
dlls/msi/table.c
+8
-1
No files found.
dlls/msi/database.c
View file @
eef54ffe
...
...
@@ -300,26 +300,38 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb)
}
else
if
(
szPersist
==
MSIDBOPEN_CREATE
||
szPersist
==
MSIDBOPEN_CREATEDIRECT
)
{
/* FIXME: MSIDBOPEN_CREATE should case STGM_TRANSACTED flag to be
* used here: */
r
=
StgCreateDocfile
(
szDBPath
,
STGM_CREATE
|
STGM_DIRECT
|
STGM_READWRITE
|
STGM_SHARE_EXCLUSIVE
,
0
,
&
stg
);
if
(
r
==
ERROR_SUCCESS
)
if
(
szPersist
==
MSIDBOPEN_CREATE
)
{
r
=
StgCreateDocfile
(
szDBPath
,
STGM_CREATE
|
STGM_TRANSACTED
|
STGM_READWRITE
|
STGM_SHARE_EXCLUSIVE
,
0
,
&
stg
);
}
else
{
r
=
StgCreateDocfile
(
szDBPath
,
STGM_CREATE
|
STGM_DIRECT
|
STGM_READWRITE
|
STGM_SHARE_EXCLUSIVE
,
0
,
&
stg
);
}
if
(
SUCCEEDED
(
r
)
)
{
IStorage_SetClass
(
stg
,
patch
?
&
CLSID_MsiPatch
:
&
CLSID_MsiDatabase
);
/* create the _Tables stream */
r
=
write_stream_data
(
stg
,
szTables
,
NULL
,
0
,
TRUE
);
if
(
SUCCEEDED
(
r
))
{
r
=
msi_init_string_table
(
stg
);
if
(
SUCCEEDED
(
r
))
{
r
=
IStorage_Commit
(
stg
,
0
);
if
(
FAILED
(
r
))
WARN
(
"failed to commit changes 0x%08x
\n
"
,
r
);
}
}
}
created
=
TRUE
;
}
else
if
(
szPersist
==
MSIDBOPEN_TRANSACT
)
{
/* FIXME: MSIDBOPEN_TRANSACT should case STGM_TRANSACTED flag to be
* used here: */
r
=
StgOpenStorage
(
szDBPath
,
NULL
,
STGM_
DIRECT
|
STGM_READWRITE
|
STGM_SHARE_EXCLUSIVE
,
NULL
,
0
,
&
stg
);
STGM_
TRANSACTED
|
STGM_READWRITE
|
STGM_SHARE_EXCLUSIVE
,
NULL
,
0
,
&
stg
);
}
else
if
(
szPersist
==
MSIDBOPEN_DIRECT
)
{
...
...
dlls/msi/table.c
View file @
eef54ffe
...
...
@@ -2319,6 +2319,7 @@ UINT TABLE_CreateView( MSIDATABASE *db, LPCWSTR name, MSIVIEW **view )
UINT
MSI_CommitTables
(
MSIDATABASE
*
db
)
{
UINT
r
;
HRESULT
hr
;
MSITABLE
*
table
=
NULL
;
TRACE
(
"%p
\n
"
,
db
);
...
...
@@ -2344,7 +2345,13 @@ UINT MSI_CommitTables( MSIDATABASE *db )
/* force everything to reload next time */
free_cached_tables
(
db
);
return
ERROR_SUCCESS
;
hr
=
IStorage_Commit
(
db
->
storage
,
0
);
if
(
FAILED
(
hr
))
{
WARN
(
"failed to commit changes 0x%08x
\n
"
,
hr
);
r
=
ERROR_FUNCTION_FAILED
;
}
return
r
;
}
MSICONDITION
MSI_DatabaseIsTablePersistent
(
MSIDATABASE
*
db
,
LPCWSTR
table
)
...
...
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