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
6c95dc64
Commit
6c95dc64
authored
Oct 26, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Oct 26, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Allow UPDATE queries without a condition.
parent
15bfb30f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
22 deletions
+31
-22
sql.y
dlls/msi/sql.y
+11
-1
db.c
dlls/msi/tests/db.c
+9
-15
update.c
dlls/msi/update.c
+11
-6
No files found.
dlls/msi/sql.y
View file @
6c95dc64
...
...
@@ -214,13 +214,23 @@ oneupdate:
TK_UPDATE table TK_SET update_assign_list TK_WHERE expr
{
SQL_input* sql = (SQL_input*) info;
MSIVIEW *update = NULL;
MSIVIEW *update = NULL;
UPDATE_CreateView( sql->db, &update, $2, $4, $6 );
if( !update )
YYABORT;
$$ = update;
}
| TK_UPDATE table TK_SET update_assign_list
{
SQL_input* sql = (SQL_input*) info;
MSIVIEW *update = NULL;
UPDATE_CreateView( sql->db, &update, $2, $4, NULL );
if( !update )
YYABORT;
$$ = update;
}
;
onedelete:
...
...
dlls/msi/tests/db.c
View file @
6c95dc64
...
...
@@ -3093,17 +3093,14 @@ static void test_update(void)
/* no where condition */
query
=
"UPDATE `Control` SET `Text` = 'this is text'"
;
todo_wine
{
r
=
MsiDatabaseOpenView
(
hdb
,
query
,
&
view
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCESS, got %d
\n
"
,
r
);
r
=
MsiViewExecute
(
view
,
0
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
MsiViewClose
(
view
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewClose failed
\n
"
);
r
=
MsiCloseHandle
(
view
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiCloseHandle failed
\n
"
);
}
r
=
MsiDatabaseOpenView
(
hdb
,
query
,
&
view
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCESS, got %d
\n
"
,
r
);
r
=
MsiViewExecute
(
view
,
0
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
MsiViewClose
(
view
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewClose failed
\n
"
);
r
=
MsiCloseHandle
(
view
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiCloseHandle failed
\n
"
);
/* check the modified text */
query
=
"SELECT `Text` FROM `Control`"
;
...
...
@@ -3138,10 +3135,7 @@ static void test_update(void)
size
=
MAX_PATH
;
r
=
MsiRecordGetString
(
rec
,
1
,
result
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
todo_wine
{
ok
(
!
lstrcmp
(
result
,
"this is text"
),
"Expected `this is text`, got %s
\n
"
,
result
);
}
ok
(
!
lstrcmp
(
result
,
"this is text"
),
"Expected `this is text`, got %s
\n
"
,
result
);
MsiCloseHandle
(
rec
);
...
...
dlls/msi/update.c
View file @
6c95dc64
...
...
@@ -199,14 +199,19 @@ UINT UPDATE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR table,
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
/* add conditions first */
r
=
WHERE_CreateView
(
db
,
&
wv
,
tv
,
expr
);
if
(
r
!=
ERROR_SUCCESS
)
if
(
expr
)
{
tv
->
ops
->
delete
(
tv
);
return
r
;
/* add conditions first */
r
=
WHERE_CreateView
(
db
,
&
wv
,
tv
,
expr
);
if
(
r
!=
ERROR_SUCCESS
)
{
tv
->
ops
->
delete
(
tv
);
return
r
;
}
}
else
wv
=
tv
;
/* then select the columns we want */
r
=
SELECT_CreateView
(
db
,
&
sv
,
wv
,
columns
);
if
(
r
!=
ERROR_SUCCESS
)
...
...
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