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
a52c2bf9
Commit
a52c2bf9
authored
Aug 26, 2011
by
Bernhard Loos
Committed by
Alexandre Julliard
Aug 26, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Make WHEREVIEW able to deal directly with multiple tables.
parent
9b79fd57
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
28 deletions
+27
-28
query.h
dlls/msi/query.h
+15
-7
sql.y
dlls/msi/sql.y
+4
-4
db.c
dlls/msi/tests/db.c
+1
-1
update.c
dlls/msi/update.c
+7
-16
where.c
dlls/msi/where.c
+0
-0
No files found.
dlls/msi/query.h
View file @
a52c2bf9
...
...
@@ -68,10 +68,19 @@ struct complex_expr
struct
expr
*
right
;
};
struct
ext_column
struct
tagJOINTABLE
;
union
ext_column
{
LPCWSTR
column
;
LPCWSTR
table
;
struct
{
LPCWSTR
column
;
LPCWSTR
table
;
}
unparsed
;
struct
{
UINT
column
;
struct
tagJOINTABLE
*
table
;
}
parsed
;
};
struct
expr
...
...
@@ -83,8 +92,7 @@ struct expr
INT
ival
;
UINT
uval
;
LPCWSTR
sval
;
struct
ext_column
column
;
UINT
col_number
;
union
ext_column
column
;
}
u
;
};
...
...
@@ -101,7 +109,7 @@ UINT DISTINCT_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table ) DECL
UINT
ORDER_CreateView
(
MSIDATABASE
*
db
,
MSIVIEW
**
view
,
MSIVIEW
*
table
,
column_info
*
columns
)
DECLSPEC_HIDDEN
;
UINT
WHERE_CreateView
(
MSIDATABASE
*
db
,
MSIVIEW
**
view
,
MSIVIEW
*
table
,
UINT
WHERE_CreateView
(
MSIDATABASE
*
db
,
MSIVIEW
**
view
,
LPWSTR
tables
,
struct
expr
*
cond
)
DECLSPEC_HIDDEN
;
UINT
CREATE_CreateView
(
MSIDATABASE
*
db
,
MSIVIEW
**
view
,
LPCWSTR
table
,
...
...
@@ -110,7 +118,7 @@ UINT CREATE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPCWSTR table,
UINT
INSERT_CreateView
(
MSIDATABASE
*
db
,
MSIVIEW
**
view
,
LPCWSTR
table
,
column_info
*
columns
,
column_info
*
values
,
BOOL
temp
)
DECLSPEC_HIDDEN
;
UINT
UPDATE_CreateView
(
MSIDATABASE
*
db
,
MSIVIEW
**
view
,
LP
C
WSTR
table
,
UINT
UPDATE_CreateView
(
MSIDATABASE
*
db
,
MSIVIEW
**
view
,
LPWSTR
table
,
column_info
*
list
,
struct
expr
*
expr
)
DECLSPEC_HIDDEN
;
UINT
DELETE_CreateView
(
MSIDATABASE
*
db
,
MSIVIEW
**
view
,
MSIVIEW
*
table
)
DECLSPEC_HIDDEN
;
...
...
dlls/msi/sql.y
View file @
a52c2bf9
...
...
@@ -478,13 +478,13 @@ selcollist:
from:
fromtable
|
fromtable
TK_WHERE expr
|
TK_FROM tablelist
TK_WHERE expr
{
SQL_input* sql = (SQL_input*) info;
MSIVIEW* where = NULL;
UINT r;
r = WHERE_CreateView( sql->db, &where, $
1, $3
);
r = WHERE_CreateView( sql->db, &where, $
2, $4
);
if( r != ERROR_SUCCESS )
YYABORT;
...
...
@@ -877,8 +877,8 @@ static struct expr * EXPR_column( void *info, const column_info *column )
if( e )
{
e->type = EXPR_COLUMN;
e->u.column.column = column->column;
e->u.column.table = column->table;
e->u.column.
unparsed.
column = column->column;
e->u.column.
unparsed.
table = column->table;
}
return e;
}
...
...
dlls/msi/tests/db.c
View file @
a52c2bf9
...
...
@@ -3895,7 +3895,7 @@ static void test_join(void)
/* primary key cannot be updated */
r
=
MsiViewModify
(
hview
,
MSIMODIFY_UPDATE
,
hrec
);
todo_wine
ok
(
r
==
ERROR_FUNCTION_FAILED
,
"failed to update row: %d
\n
"
,
r
);
ok
(
r
==
ERROR_FUNCTION_FAILED
,
"failed to update row: %d
\n
"
,
r
);
MsiCloseHandle
(
hrec
);
MsiViewClose
(
hview
);
...
...
dlls/msi/update.c
View file @
a52c2bf9
...
...
@@ -225,31 +225,22 @@ static const MSIVIEWOPS update_ops =
NULL
,
};
UINT
UPDATE_CreateView
(
MSIDATABASE
*
db
,
MSIVIEW
**
view
,
LP
C
WSTR
table
,
UINT
UPDATE_CreateView
(
MSIDATABASE
*
db
,
MSIVIEW
**
view
,
LPWSTR
table
,
column_info
*
columns
,
struct
expr
*
expr
)
{
MSIUPDATEVIEW
*
uv
=
NULL
;
UINT
r
;
MSIVIEW
*
tv
=
NULL
,
*
sv
=
NULL
,
*
wv
=
NULL
;
MSIVIEW
*
sv
=
NULL
,
*
wv
=
NULL
;
TRACE
(
"%p
\n
"
,
uv
);
r
=
TABLE_CreateView
(
db
,
table
,
&
tv
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
if
(
expr
)
{
/* add conditions first */
r
=
WHERE_CreateView
(
db
,
&
wv
,
tv
,
expr
);
if
(
r
!=
ERROR_SUCCESS
)
{
tv
->
ops
->
delete
(
tv
);
return
r
;
}
}
r
=
WHERE_CreateView
(
db
,
&
wv
,
table
,
expr
);
else
wv
=
tv
;
r
=
TABLE_CreateView
(
db
,
table
,
&
wv
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
/* then select the columns we want */
r
=
SELECT_CreateView
(
db
,
&
sv
,
wv
,
columns
);
...
...
dlls/msi/where.c
View file @
a52c2bf9
This diff is collapsed.
Click to expand it.
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