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
ea289151
Commit
ea289151
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: Don't create a temporary table that is not held.
parent
241933e1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
11 deletions
+20
-11
create.c
dlls/msi/create.c
+6
-1
package.c
dlls/msi/package.c
+9
-8
db.c
dlls/msi/tests/db.c
+5
-2
No files found.
dlls/msi/create.c
View file @
ea289151
...
@@ -44,6 +44,7 @@ typedef struct tagMSICREATEVIEW
...
@@ -44,6 +44,7 @@ typedef struct tagMSICREATEVIEW
MSIDATABASE
*
db
;
MSIDATABASE
*
db
;
LPWSTR
name
;
LPWSTR
name
;
BOOL
bIsTemp
;
BOOL
bIsTemp
;
BOOL
hold
;
column_info
*
col_info
;
column_info
*
col_info
;
}
MSICREATEVIEW
;
}
MSICREATEVIEW
;
...
@@ -62,9 +63,12 @@ static UINT CREATE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
...
@@ -62,9 +63,12 @@ static UINT CREATE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
MSITABLE
*
table
;
MSITABLE
*
table
;
BOOL
persist
=
(
cv
->
bIsTemp
)
?
MSICONDITION_FALSE
:
MSICONDITION_TRUE
;
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"
);
if
(
cv
->
bIsTemp
&&
!
cv
->
hold
)
return
ERROR_SUCCESS
;
return
msi_create_table
(
cv
->
db
,
cv
->
name
,
cv
->
col_info
,
persist
,
&
table
);
return
msi_create_table
(
cv
->
db
,
cv
->
name
,
cv
->
col_info
,
persist
,
&
table
);
}
}
...
@@ -197,6 +201,7 @@ UINT CREATE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR table,
...
@@ -197,6 +201,7 @@ UINT CREATE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR table,
cv
->
name
=
table
;
cv
->
name
=
table
;
cv
->
col_info
=
col_info
;
cv
->
col_info
=
col_info
;
cv
->
bIsTemp
=
temp
;
cv
->
bIsTemp
=
temp
;
cv
->
hold
=
hold
;
*
view
=
(
MSIVIEW
*
)
cv
;
*
view
=
(
MSIVIEW
*
)
cv
;
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
...
...
dlls/msi/package.c
View file @
ea289151
...
@@ -66,14 +66,15 @@ static UINT create_temp_property_table(MSIPACKAGE *package)
...
@@ -66,14 +66,15 @@ static UINT create_temp_property_table(MSIPACKAGE *package)
UINT
rc
;
UINT
rc
;
static
const
WCHAR
CreateSql
[]
=
{
static
const
WCHAR
CreateSql
[]
=
{
'C'
,
'R'
,
'E'
,
'A'
,
'T'
,
'E'
,
' '
,
'T'
,
'A'
,
'B'
,
'L'
,
'E'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'C'
,
'R'
,
'E'
,
'A'
,
'T'
,
'E'
,
' '
,
'T'
,
'A'
,
'B'
,
'L'
,
'E'
,
' '
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
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,
' '
,
'N'
,
'U'
,
'L'
,
'L'
,
' '
,
'T'
,
'E'
,
'M'
,
'P'
,
'O'
,
'R'
,
'A'
,
'R'
,
'Y'
,
'`'
,
')'
,
0
};
' '
,
'P'
,
'R'
,
'I'
,
'M'
,
'A'
,
'R'
,
'Y'
,
' '
,
'K'
,
'E'
,
'Y'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
')'
,
' '
,
'H'
,
'O'
,
'L'
,
'D'
,
0
};
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
CreateSql
,
&
view
);
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
CreateSql
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
!=
ERROR_SUCCESS
)
...
...
dlls/msi/tests/db.c
View file @
ea289151
...
@@ -3274,10 +3274,13 @@ static void test_temporary_table(void)
...
@@ -3274,10 +3274,13 @@ static void test_temporary_table(void)
r
=
run_query
(
hdb
,
0
,
query
);
r
=
run_query
(
hdb
,
0
,
query
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to add table
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to add table
\n
"
);
todo_wine
{
query
=
"SELECT * FROM `T2`"
;
r
=
MsiDatabaseOpenView
(
hdb
,
query
,
&
view
);
ok
(
r
==
ERROR_BAD_QUERY_SYNTAX
,
"Expected ERROR_BAD_QUERY_SYNTAX, got %d
\n
"
,
r
);
cond
=
MsiDatabaseIsTablePersistent
(
hdb
,
"T2"
);
cond
=
MsiDatabaseIsTablePersistent
(
hdb
,
"T2"
);
ok
(
cond
==
MSICONDITION_NONE
,
"wrong return condition
\n
"
);
ok
(
cond
==
MSICONDITION_NONE
,
"wrong return condition
\n
"
);
}
query
=
"CREATE TABLE `T3` ( `B` SHORT NOT NULL TEMPORARY, `C` CHAR(255) PRIMARY KEY `C`)"
;
query
=
"CREATE TABLE `T3` ( `B` SHORT NOT NULL TEMPORARY, `C` CHAR(255) PRIMARY KEY `C`)"
;
r
=
run_query
(
hdb
,
0
,
query
);
r
=
run_query
(
hdb
,
0
,
query
);
...
...
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