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
1bd8d8a5
Commit
1bd8d8a5
authored
Dec 22, 2004
by
Mike McCormack
Committed by
Alexandre Julliard
Dec 22, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix selecting string columns and matching against a wildcard.
parent
ee0344a4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
6 deletions
+20
-6
query.h
dlls/msi/query.h
+1
-0
table.c
dlls/msi/table.c
+1
-1
where.c
dlls/msi/where.c
+18
-5
No files found.
dlls/msi/query.h
View file @
1bd8d8a5
...
...
@@ -52,6 +52,7 @@
#define EXPR_STRCMP 7
#define EXPR_UTF8 8
#define EXPR_WILDCARD 9
#define EXPR_COL_NUMBER_STRING 10
struct
sql_str
{
LPCWSTR
data
;
...
...
dlls/msi/table.c
View file @
1bd8d8a5
...
...
@@ -1088,7 +1088,7 @@ static UINT TABLE_fetch_int( struct tagMSIVIEW *view, UINT row, UINT col, UINT *
return
ERROR_FUNCTION_FAILED
;
}
TRACE
(
"Data [%d][%d] = %d
\n
"
,
row
,
col
,
*
val
);
/* TRACE("Data [%d][%d] = %d \n", row, col, *val ); */
return
ERROR_SUCCESS
;
}
...
...
dlls/msi/where.c
View file @
1bd8d8a5
...
...
@@ -137,7 +137,7 @@ static const WCHAR *STRING_evaluate( string_table *st,
switch
(
expr
->
type
)
{
case
EXPR_COL_NUMBER
:
case
EXPR_COL_NUMBER
_STRING
:
r
=
table
->
ops
->
fetch_int
(
table
,
row
,
expr
->
u
.
col_number
,
&
val
);
if
(
r
!=
ERROR_SUCCESS
)
return
NULL
;
...
...
@@ -190,6 +190,7 @@ static UINT WHERE_evaluate( MSIDATABASE *db, MSIVIEW *table, UINT row,
switch
(
cond
->
type
)
{
case
EXPR_COL_NUMBER_STRING
:
case
EXPR_COL_NUMBER
:
return
table
->
ops
->
fetch_int
(
table
,
row
,
cond
->
u
.
col_number
,
val
);
...
...
@@ -368,9 +369,19 @@ static UINT WHERE_VerifyCondition( MSIDATABASE *db, MSIVIEW *table, struct expr
r
=
VIEW_find_column
(
table
,
cond
->
u
.
column
,
&
val
);
if
(
r
==
ERROR_SUCCESS
)
{
*
valid
=
1
;
cond
->
type
=
EXPR_COL_NUMBER
;
cond
->
u
.
col_number
=
val
;
UINT
type
=
0
;
r
=
table
->
ops
->
get_column_info
(
table
,
val
,
NULL
,
&
type
);
if
(
r
==
ERROR_SUCCESS
)
{
if
(
type
&
MSITYPE_STRING
)
cond
->
type
=
EXPR_COL_NUMBER_STRING
;
else
cond
->
type
=
EXPR_COL_NUMBER
;
cond
->
u
.
col_number
=
val
;
*
valid
=
1
;
}
else
*
valid
=
0
;
}
else
{
...
...
@@ -390,7 +401,9 @@ static UINT WHERE_VerifyCondition( MSIDATABASE *db, MSIVIEW *table, struct expr
/* check the type of the comparison */
if
(
(
cond
->
u
.
expr
.
left
->
type
==
EXPR_SVAL
)
||
(
cond
->
u
.
expr
.
right
->
type
==
EXPR_SVAL
)
)
(
cond
->
u
.
expr
.
left
->
type
==
EXPR_COL_NUMBER_STRING
)
||
(
cond
->
u
.
expr
.
right
->
type
==
EXPR_SVAL
)
||
(
cond
->
u
.
expr
.
right
->
type
==
EXPR_COL_NUMBER_STRING
)
)
{
switch
(
cond
->
u
.
expr
.
op
)
{
...
...
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