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
4ab109e5
Commit
4ab109e5
authored
Jul 25, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Jul 25, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Fix where queries on 32bit integer columns.
parent
8144e171
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
13 deletions
+21
-13
query.h
dlls/msi/query.h
+1
-0
db.c
dlls/msi/tests/db.c
+2
-5
where.c
dlls/msi/where.c
+18
-8
No files found.
dlls/msi/query.h
View file @
4ab109e5
...
...
@@ -53,6 +53,7 @@
#define EXPR_STRCMP 7
#define EXPR_WILDCARD 9
#define EXPR_COL_NUMBER_STRING 10
#define EXPR_COL_NUMBER32 11
struct
sql_str
{
LPCWSTR
data
;
...
...
dlls/msi/tests/db.c
View file @
4ab109e5
...
...
@@ -1029,11 +1029,8 @@ static void test_where(void)
query
=
"SELECT * FROM `Media` WHERE `LastSequence` >= 1"
;
r
=
do_query
(
hdb
,
query
,
&
rec
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewFetch failed: %d
\n
"
,
r
);
ok
(
check_record
(
rec
,
4
,
"one.cab"
),
"wrong cabinet
\n
"
);
}
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewFetch failed: %d
\n
"
,
r
);
ok
(
check_record
(
rec
,
4
,
"one.cab"
),
"wrong cabinet
\n
"
);
MsiCloseHandle
(
hdb
);
DeleteFile
(
msifile
);
...
...
dlls/msi/where.c
View file @
4ab109e5
...
...
@@ -99,7 +99,7 @@ static UINT WHERE_set_int( struct tagMSIVIEW *view, UINT row, UINT col, UINT val
return
wv
->
table
->
ops
->
set_int
(
wv
->
table
,
row
,
col
,
val
);
}
static
UINT
INT_evaluate
(
UINT
lval
,
UINT
op
,
U
INT
rval
)
static
INT
INT_evaluate
(
INT
lval
,
UINT
op
,
INT
rval
)
{
switch
(
op
)
{
...
...
@@ -156,7 +156,7 @@ static const WCHAR *STRING_evaluate( string_table *st,
}
static
UINT
STRCMP_Evaluate
(
string_table
*
st
,
MSIVIEW
*
table
,
UINT
row
,
struct
expr
*
cond
,
U
INT
*
val
,
MSIRECORD
*
record
)
struct
expr
*
cond
,
INT
*
val
,
MSIRECORD
*
record
)
{
int
sr
;
const
WCHAR
*
l_str
,
*
r_str
;
...
...
@@ -180,18 +180,25 @@ static UINT STRCMP_Evaluate( string_table *st, MSIVIEW *table, UINT row,
}
static
UINT
WHERE_evaluate
(
MSIDATABASE
*
db
,
MSIVIEW
*
table
,
UINT
row
,
struct
expr
*
cond
,
U
INT
*
val
,
MSIRECORD
*
record
)
struct
expr
*
cond
,
INT
*
val
,
MSIRECORD
*
record
)
{
UINT
r
,
lval
,
rval
;
UINT
r
,
tval
;
INT
lval
,
rval
;
if
(
!
cond
)
return
ERROR_SUCCESS
;
switch
(
cond
->
type
)
{
case
EXPR_COL_NUMBER_STRING
:
case
EXPR_COL_NUMBER
:
return
table
->
ops
->
fetch_int
(
table
,
row
,
cond
->
u
.
col_number
,
val
);
r
=
table
->
ops
->
fetch_int
(
table
,
row
,
cond
->
u
.
col_number
,
&
tval
);
*
val
=
tval
-
0x8000
;
return
ERROR_SUCCESS
;
case
EXPR_COL_NUMBER32
:
r
=
table
->
ops
->
fetch_int
(
table
,
row
,
cond
->
u
.
col_number
,
&
tval
);
*
val
=
tval
;
return
r
;
case
EXPR_UVAL
:
*
val
=
cond
->
u
.
uval
;
...
...
@@ -226,7 +233,8 @@ static UINT WHERE_evaluate( MSIDATABASE *db, MSIVIEW *table, UINT row,
static
UINT
WHERE_execute
(
struct
tagMSIVIEW
*
view
,
MSIRECORD
*
record
)
{
MSIWHEREVIEW
*
wv
=
(
MSIWHEREVIEW
*
)
view
;
UINT
count
=
0
,
r
,
val
,
i
;
UINT
count
=
0
,
r
,
i
;
INT
val
;
MSIVIEW
*
table
=
wv
->
table
;
TRACE
(
"%p %p
\n
"
,
wv
,
record
);
...
...
@@ -440,6 +448,8 @@ static UINT WHERE_VerifyCondition( MSIDATABASE *db, MSIVIEW *table, struct expr
{
if
(
type
&
MSITYPE_STRING
)
cond
->
type
=
EXPR_COL_NUMBER_STRING
;
else
if
((
type
&
0xff
)
==
4
)
cond
->
type
=
EXPR_COL_NUMBER32
;
else
cond
->
type
=
EXPR_COL_NUMBER
;
cond
->
u
.
col_number
=
val
;
...
...
@@ -490,7 +500,7 @@ static UINT WHERE_VerifyCondition( MSIDATABASE *db, MSIVIEW *table, struct expr
case
EXPR_IVAL
:
*
valid
=
1
;
cond
->
type
=
EXPR_UVAL
;
cond
->
u
.
uval
=
cond
->
u
.
ival
+
(
1
<<
15
)
;
cond
->
u
.
uval
=
cond
->
u
.
ival
;
break
;
case
EXPR_WILDCARD
:
*
valid
=
1
;
...
...
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