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
58c7fe10
Commit
58c7fe10
authored
Dec 21, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Dec 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Allow the not-equal operator in WHERE query string comparisons.
parent
3c0f7ca4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
6 deletions
+58
-6
db.c
dlls/msi/tests/db.c
+56
-6
where.c
dlls/msi/where.c
+2
-0
No files found.
dlls/msi/tests/db.c
View file @
58c7fe10
...
...
@@ -3899,13 +3899,63 @@ static void test_select_markers(void)
r
=
MsiViewFetch
(
view
,
&
res
);
ok
(
r
==
ERROR_NO_MORE_ITEMS
,
"Expected ERROR_NO_MORE_ITEMS, 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
=
MsiCloseHandle
(
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiCloseHandle failed
\n
"
);
MsiCloseHandle
(
rec
);
MsiViewClose
(
view
);
MsiCloseHandle
(
view
);
rec
=
MsiCreateRecord
(
2
);
MsiRecordSetString
(
rec
,
1
,
"one"
);
MsiRecordSetInteger
(
rec
,
2
,
1
);
query
=
"SELECT * FROM `Table` WHERE `Two`<>? AND `Three`>? ORDER BY `Three`"
;
r
=
MsiDatabaseOpenView
(
hdb
,
query
,
&
view
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
MsiViewExecute
(
view
,
rec
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
MsiViewFetch
(
view
,
&
res
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
size
=
MAX_PATH
;
r
=
MsiRecordGetString
(
res
,
1
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrcmp
(
buf
,
"apple"
),
"Expected apple, got %s
\n
"
,
buf
);
size
=
MAX_PATH
;
r
=
MsiRecordGetString
(
res
,
2
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrcmp
(
buf
,
"two"
),
"Expected two, got %s
\n
"
,
buf
);
r
=
MsiRecordGetInteger
(
res
,
3
);
ok
(
r
==
2
,
"Expected 2, got %d
\n
"
,
r
);
MsiCloseHandle
(
res
);
r
=
MsiViewFetch
(
view
,
&
res
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
size
=
MAX_PATH
;
r
=
MsiRecordGetString
(
res
,
1
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrcmp
(
buf
,
"banana"
),
"Expected banana, got %s
\n
"
,
buf
);
size
=
MAX_PATH
;
r
=
MsiRecordGetString
(
res
,
2
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrcmp
(
buf
,
"three"
),
"Expected three, got %s
\n
"
,
buf
);
r
=
MsiRecordGetInteger
(
res
,
3
);
ok
(
r
==
3
,
"Expected 3, got %d
\n
"
,
r
);
MsiCloseHandle
(
res
);
r
=
MsiViewFetch
(
view
,
&
res
);
ok
(
r
==
ERROR_NO_MORE_ITEMS
,
"Expected ERROR_NO_MORE_ITEMS, got %d
\n
"
,
r
);
MsiCloseHandle
(
rec
);
MsiViewClose
(
view
);
MsiCloseHandle
(
view
);
MsiCloseHandle
(
hdb
);
DeleteFile
(
msifile
);
}
...
...
dlls/msi/where.c
View file @
58c7fe10
...
...
@@ -286,6 +286,7 @@ static UINT STRCMP_Evaluate( MSIWHEREVIEW *wv, UINT row, const struct expr *cond
sr
=
lstrcmpW
(
l_str
,
r_str
);
*
val
=
(
cond
->
u
.
expr
.
op
==
OP_EQ
&&
(
sr
==
0
)
)
||
(
cond
->
u
.
expr
.
op
==
OP_NE
&&
(
sr
!=
0
)
)
||
(
cond
->
u
.
expr
.
op
==
OP_LT
&&
(
sr
<
0
)
)
||
(
cond
->
u
.
expr
.
op
==
OP_GT
&&
(
sr
>
0
)
);
...
...
@@ -617,6 +618,7 @@ static UINT WHERE_VerifyCondition( MSIDATABASE *db, MSIVIEW *table, struct expr
case
OP_EQ
:
case
OP_GT
:
case
OP_LT
:
case
OP_NE
:
break
;
default:
*
valid
=
FALSE
;
...
...
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