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
44f7cb88
Commit
44f7cb88
authored
Apr 24, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Apr 24, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add a persistent flag to tables.
Implement MSI_DatabaseIsTablePersistent.
parent
a33cc3d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
table.c
dlls/msi/table.c
+18
-2
db.c
dlls/msi/tests/db.c
+3
-3
No files found.
dlls/msi/table.c
View file @
44f7cb88
...
...
@@ -69,6 +69,7 @@ struct tagMSITABLE
struct
list
entry
;
MSICOLUMNINFO
*
colinfo
;
UINT
col_count
;
BOOL
persistent
;
WCHAR
name
[
1
];
};
...
...
@@ -626,6 +627,7 @@ UINT msi_create_table( MSIDATABASE *db, LPCWSTR name, column_info *col_info,
table
->
nonpersistent_data
=
NULL
;
table
->
colinfo
=
NULL
;
table
->
col_count
=
0
;
table
->
persistent
=
persistent
;
lstrcpyW
(
table
->
name
,
name
);
for
(
col
=
col_info
;
col
;
col
=
col
->
next
)
...
...
@@ -771,6 +773,7 @@ static UINT get_table( MSIDATABASE *db, LPCWSTR name, MSITABLE **table_ret )
table
->
nonpersistent_data
=
NULL
;
table
->
colinfo
=
NULL
;
table
->
col_count
=
0
;
table
->
persistent
=
TRUE
;
lstrcpyW
(
table
->
name
,
name
);
/* these two tables are special - we know the column types already */
...
...
@@ -811,6 +814,10 @@ static UINT save_table( MSIDATABASE *db, MSITABLE *t )
USHORT
*
rawdata
=
NULL
,
*
p
;
UINT
rawsize
,
r
,
i
,
j
,
row_size
;
/* Nothing to do for non-persistent tables */
if
(
!
t
->
persistent
)
return
ERROR_SUCCESS
;
TRACE
(
"Saving %s
\n
"
,
debugstr_w
(
t
->
name
)
);
row_size
=
msi_table_get_row_size
(
t
->
colinfo
,
t
->
col_count
);
...
...
@@ -1694,13 +1701,22 @@ UINT MSI_CommitTables( MSIDATABASE *db )
MSICONDITION
MSI_DatabaseIsTablePersistent
(
MSIDATABASE
*
db
,
LPCWSTR
table
)
{
MSITABLE
*
t
;
UINT
r
;
TRACE
(
"%p %s
\n
"
,
db
,
debugstr_w
(
table
));
if
(
!
table
)
return
MSICONDITION_ERROR
;
if
(
!
TABLE_Exists
(
db
,
table
))
r
=
get_table
(
db
,
table
,
&
t
);
if
(
r
!=
ERROR_SUCCESS
)
return
MSICONDITION_NONE
;
return
MSICONDITION_FALSE
;
if
(
t
->
persistent
)
return
MSICONDITION_TRUE
;
else
return
MSICONDITION_FALSE
;
}
static
MSIRECORD
*
msi_get_transform_record
(
MSITABLEVIEW
*
tv
,
string_table
*
st
,
USHORT
*
rawdata
)
...
...
dlls/msi/tests/db.c
View file @
44f7cb88
...
...
@@ -2658,14 +2658,14 @@ static void test_temporary_table(void)
ok
(
r
==
ERROR_SUCCESS
,
"failed to add table
\n
"
);
cond
=
MsiDatabaseIsTablePersistent
(
hdb
,
"P"
);
todo_wine
ok
(
cond
==
MSICONDITION_TRUE
,
"wrong return condition
\n
"
);
ok
(
cond
==
MSICONDITION_TRUE
,
"wrong return condition
\n
"
);
query
=
"CREATE TABLE `P2` ( `B` SHORT NOT NULL, `C` CHAR(255) PRIMARY KEY `C`) HOLD"
;
r
=
run_query
(
hdb
,
0
,
query
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to add table
\n
"
);
todo_wine
{
cond
=
MsiDatabaseIsTablePersistent
(
hdb
,
"P"
);
cond
=
MsiDatabaseIsTablePersistent
(
hdb
,
"P
2
"
);
ok
(
cond
==
MSICONDITION_TRUE
,
"wrong return condition
\n
"
);
}
...
...
@@ -2689,10 +2689,10 @@ static void test_temporary_table(void)
r
=
run_query
(
hdb
,
0
,
query
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to add table
\n
"
);
todo_wine
{
cond
=
MsiDatabaseIsTablePersistent
(
hdb
,
"T3"
);
ok
(
cond
==
MSICONDITION_TRUE
,
"wrong return condition
\n
"
);
todo_wine
{
query
=
"CREATE TABLE `T4` ( `B` SHORT NOT NULL, `C` CHAR(255) TEMPORARY PRIMARY KEY `C`)"
;
r
=
run_query
(
hdb
,
0
,
query
);
ok
(
r
==
ERROR_FUNCTION_FAILED
,
"failed to add table
\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