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
74aa0534
Commit
74aa0534
authored
Feb 25, 2009
by
James Hawkins
Committed by
Alexandre Julliard
Feb 26, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: The _Tables and _Columns tables have no persistence attribute.
parent
2f8c2a8d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
15 deletions
+15
-15
create.c
dlls/msi/create.c
+2
-1
query.h
dlls/msi/query.h
+1
-1
table.c
dlls/msi/table.c
+12
-11
db.c
dlls/msi/tests/db.c
+0
-2
No files found.
dlls/msi/create.c
View file @
74aa0534
...
@@ -60,11 +60,12 @@ static UINT CREATE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
...
@@ -60,11 +60,12 @@ static UINT CREATE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
{
{
MSICREATEVIEW
*
cv
=
(
MSICREATEVIEW
*
)
view
;
MSICREATEVIEW
*
cv
=
(
MSICREATEVIEW
*
)
view
;
MSITABLE
*
table
;
MSITABLE
*
table
;
BOOL
persist
=
(
cv
->
bIsTemp
)
?
MSICONDITION_FALSE
:
MSICONDITION_TRUE
;
TRACE
(
"%p Table %s (%s)
\n
"
,
cv
,
debugstr_w
(
cv
->
name
),
TRACE
(
"%p Table %s (%s)
\n
"
,
cv
,
debugstr_w
(
cv
->
name
),
cv
->
bIsTemp
?
"temporary"
:
"permanent"
);
cv
->
bIsTemp
?
"temporary"
:
"permanent"
);
return
msi_create_table
(
cv
->
db
,
cv
->
name
,
cv
->
col_info
,
!
cv
->
bIsTemp
,
&
table
);
return
msi_create_table
(
cv
->
db
,
cv
->
name
,
cv
->
col_info
,
persist
,
&
table
);
}
}
static
UINT
CREATE_close
(
struct
tagMSIVIEW
*
view
)
static
UINT
CREATE_close
(
struct
tagMSIVIEW
*
view
)
...
...
dlls/msi/query.h
View file @
74aa0534
...
@@ -124,6 +124,6 @@ int sqliteGetToken(const WCHAR *z, int *tokenType);
...
@@ -124,6 +124,6 @@ int sqliteGetToken(const WCHAR *z, int *tokenType);
MSIRECORD
*
msi_query_merge_record
(
UINT
fields
,
const
column_info
*
vl
,
MSIRECORD
*
rec
);
MSIRECORD
*
msi_query_merge_record
(
UINT
fields
,
const
column_info
*
vl
,
MSIRECORD
*
rec
);
UINT
msi_create_table
(
MSIDATABASE
*
db
,
LPCWSTR
name
,
column_info
*
col_info
,
UINT
msi_create_table
(
MSIDATABASE
*
db
,
LPCWSTR
name
,
column_info
*
col_info
,
BOOL
persistent
,
MSITABLE
**
table_ret
);
MSICONDITION
persistent
,
MSITABLE
**
table_ret
);
#endif
/* __WINE_MSI_QUERY_H */
#endif
/* __WINE_MSI_QUERY_H */
dlls/msi/table.c
View file @
74aa0534
...
@@ -78,7 +78,7 @@ struct tagMSITABLE
...
@@ -78,7 +78,7 @@ struct tagMSITABLE
struct
list
entry
;
struct
list
entry
;
MSICOLUMNINFO
*
colinfo
;
MSICOLUMNINFO
*
colinfo
;
UINT
col_count
;
UINT
col_count
;
BOOL
persistent
;
MSICONDITION
persistent
;
INT
ref_count
;
INT
ref_count
;
WCHAR
name
[
1
];
WCHAR
name
[
1
];
};
};
...
@@ -610,7 +610,7 @@ static UINT table_get_column_info( MSIDATABASE *db, LPCWSTR name, MSICOLUMNINFO
...
@@ -610,7 +610,7 @@ static UINT table_get_column_info( MSIDATABASE *db, LPCWSTR name, MSICOLUMNINFO
}
}
UINT
msi_create_table
(
MSIDATABASE
*
db
,
LPCWSTR
name
,
column_info
*
col_info
,
UINT
msi_create_table
(
MSIDATABASE
*
db
,
LPCWSTR
name
,
column_info
*
col_info
,
BOOL
persistent
,
MSITABLE
**
table_ret
)
MSICONDITION
persistent
,
MSITABLE
**
table_ret
)
{
{
UINT
r
,
nField
;
UINT
r
,
nField
;
MSIVIEW
*
tv
=
NULL
;
MSIVIEW
*
tv
=
NULL
;
...
@@ -683,7 +683,7 @@ UINT msi_create_table( MSIDATABASE *db, LPCWSTR name, column_info *col_info,
...
@@ -683,7 +683,7 @@ UINT msi_create_table( MSIDATABASE *db, LPCWSTR name, column_info *col_info,
if
(
r
)
if
(
r
)
goto
err
;
goto
err
;
r
=
tv
->
ops
->
insert_row
(
tv
,
rec
,
!
persistent
);
r
=
tv
->
ops
->
insert_row
(
tv
,
rec
,
persistent
==
MSICONDITION_FALSE
);
TRACE
(
"insert_row returned %x
\n
"
,
r
);
TRACE
(
"insert_row returned %x
\n
"
,
r
);
if
(
r
)
if
(
r
)
goto
err
;
goto
err
;
...
@@ -694,7 +694,7 @@ UINT msi_create_table( MSIDATABASE *db, LPCWSTR name, column_info *col_info,
...
@@ -694,7 +694,7 @@ UINT msi_create_table( MSIDATABASE *db, LPCWSTR name, column_info *col_info,
msiobj_release
(
&
rec
->
hdr
);
msiobj_release
(
&
rec
->
hdr
);
rec
=
NULL
;
rec
=
NULL
;
if
(
persistent
)
if
(
persistent
!=
MSICONDITION_FALSE
)
{
{
/* add each column to the _Columns table */
/* add each column to the _Columns table */
r
=
TABLE_CreateView
(
db
,
szColumns
,
&
tv
);
r
=
TABLE_CreateView
(
db
,
szColumns
,
&
tv
);
...
@@ -785,9 +785,12 @@ static UINT get_table( MSIDATABASE *db, LPCWSTR name, MSITABLE **table_ret )
...
@@ -785,9 +785,12 @@ static UINT get_table( MSIDATABASE *db, LPCWSTR name, MSITABLE **table_ret )
table
->
nonpersistent_data
=
NULL
;
table
->
nonpersistent_data
=
NULL
;
table
->
colinfo
=
NULL
;
table
->
colinfo
=
NULL
;
table
->
col_count
=
0
;
table
->
col_count
=
0
;
table
->
persistent
=
TRUE
;
table
->
persistent
=
MSICONDITION_
TRUE
;
lstrcpyW
(
table
->
name
,
name
);
lstrcpyW
(
table
->
name
,
name
);
if
(
!
lstrcmpW
(
name
,
szTables
)
||
!
lstrcmpW
(
name
,
szColumns
)
)
table
->
persistent
=
MSICONDITION_NONE
;
r
=
table_get_column_info
(
db
,
name
,
&
table
->
colinfo
,
&
table
->
col_count
);
r
=
table_get_column_info
(
db
,
name
,
&
table
->
colinfo
,
&
table
->
col_count
);
if
(
r
!=
ERROR_SUCCESS
)
if
(
r
!=
ERROR_SUCCESS
)
{
{
...
@@ -813,7 +816,7 @@ static UINT save_table( MSIDATABASE *db, const MSITABLE *t )
...
@@ -813,7 +816,7 @@ static UINT save_table( MSIDATABASE *db, const MSITABLE *t )
UINT
rawsize
,
r
,
i
,
j
,
row_size
;
UINT
rawsize
,
r
,
i
,
j
,
row_size
;
/* Nothing to do for non-persistent tables */
/* Nothing to do for non-persistent tables */
if
(
!
t
->
persistent
)
if
(
t
->
persistent
==
MSICONDITION_FALSE
)
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
TRACE
(
"Saving %s
\n
"
,
debugstr_w
(
t
->
name
)
);
TRACE
(
"Saving %s
\n
"
,
debugstr_w
(
t
->
name
)
);
...
@@ -1298,7 +1301,8 @@ static UINT TABLE_set_row( struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, UI
...
@@ -1298,7 +1301,8 @@ static UINT TABLE_set_row( struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, UI
continue
;
continue
;
/* if row >= tv->table->row_count then it is a non-persistent row */
/* if row >= tv->table->row_count then it is a non-persistent row */
persistent
=
tv
->
table
->
persistent
&&
(
row
<
tv
->
table
->
row_count
);
persistent
=
(
tv
->
table
->
persistent
!=
MSICONDITION_FALSE
)
&&
(
row
<
tv
->
table
->
row_count
);
/* FIXME: should we allow updating keys? */
/* FIXME: should we allow updating keys? */
val
=
0
;
val
=
0
;
...
@@ -2214,10 +2218,7 @@ MSICONDITION MSI_DatabaseIsTablePersistent( MSIDATABASE *db, LPCWSTR table )
...
@@ -2214,10 +2218,7 @@ MSICONDITION MSI_DatabaseIsTablePersistent( MSIDATABASE *db, LPCWSTR table )
if
(
r
!=
ERROR_SUCCESS
)
if
(
r
!=
ERROR_SUCCESS
)
return
MSICONDITION_NONE
;
return
MSICONDITION_NONE
;
if
(
t
->
persistent
)
return
t
->
persistent
;
return
MSICONDITION_TRUE
;
else
return
MSICONDITION_FALSE
;
}
}
static
UINT
read_raw_int
(
const
BYTE
*
data
,
UINT
col
,
UINT
bytes
)
static
UINT
read_raw_int
(
const
BYTE
*
data
,
UINT
col
,
UINT
bytes
)
...
...
dlls/msi/tests/db.c
View file @
74aa0534
...
@@ -3237,13 +3237,11 @@ static void test_temporary_table(void)
...
@@ -3237,13 +3237,11 @@ static void test_temporary_table(void)
cond
=
MsiDatabaseIsTablePersistent
(
hdb
,
NULL
);
cond
=
MsiDatabaseIsTablePersistent
(
hdb
,
NULL
);
ok
(
cond
==
MSICONDITION_ERROR
,
"wrong return condition
\n
"
);
ok
(
cond
==
MSICONDITION_ERROR
,
"wrong return condition
\n
"
);
todo_wine
{
cond
=
MsiDatabaseIsTablePersistent
(
hdb
,
"_Tables"
);
cond
=
MsiDatabaseIsTablePersistent
(
hdb
,
"_Tables"
);
ok
(
cond
==
MSICONDITION_NONE
,
"wrong return condition
\n
"
);
ok
(
cond
==
MSICONDITION_NONE
,
"wrong return condition
\n
"
);
cond
=
MsiDatabaseIsTablePersistent
(
hdb
,
"_Columns"
);
cond
=
MsiDatabaseIsTablePersistent
(
hdb
,
"_Columns"
);
ok
(
cond
==
MSICONDITION_NONE
,
"wrong return condition
\n
"
);
ok
(
cond
==
MSICONDITION_NONE
,
"wrong return condition
\n
"
);
}
cond
=
MsiDatabaseIsTablePersistent
(
hdb
,
"_Storages"
);
cond
=
MsiDatabaseIsTablePersistent
(
hdb
,
"_Storages"
);
ok
(
cond
==
MSICONDITION_NONE
,
"wrong return condition
\n
"
);
ok
(
cond
==
MSICONDITION_NONE
,
"wrong return condition
\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