Nathan Gallaher : msi: Add support for table names in select statements.
Module: wine Branch: master Commit: 5c56e1f440049e0676b81f74c182d4ce25661dec URL: http://source.winehq.org/git/wine.git/?a=commit;h=5c56e1f440049e0676b81f74c1... Author: Nathan Gallaher <ngallaher(a)deepthought.org> Date: Mon Nov 9 20:41:43 2009 -0500 msi: Add support for table names in select statements. Propagate tablename from 'SELECT tablename.column from tablename' queries into VIEW_find_column(). Previously, the tablename had been dropped. --- dlls/msi/select.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/msi/select.c b/dlls/msi/select.c index c4b9e80..f6b5dae 100644 --- a/dlls/msi/select.c +++ b/dlls/msi/select.c @@ -368,12 +368,14 @@ static const MSIVIEWOPS select_ops = NULL, }; -static UINT SELECT_AddColumn( MSISELECTVIEW *sv, LPCWSTR name ) +static UINT SELECT_AddColumn( MSISELECTVIEW *sv, LPCWSTR name, + LPCWSTR table_name ) { UINT r, n=0; MSIVIEW *table; - TRACE("%p adding %s\n", sv, debugstr_w( name ) ); + TRACE("%p adding %s.%s\n", sv, debugstr_w( table_name ), + debugstr_w( name )); if( sv->view.ops != &select_ops ) return ERROR_FUNCTION_FAILED; @@ -389,7 +391,7 @@ static UINT SELECT_AddColumn( MSISELECTVIEW *sv, LPCWSTR name ) if( sv->num_cols >= sv->max_cols ) return ERROR_FUNCTION_FAILED; - r = VIEW_find_column( table, name, NULL, &n ); + r = VIEW_find_column( table, name, table_name, &n ); if( r != ERROR_SUCCESS ) return r; @@ -433,7 +435,7 @@ UINT SELECT_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table, while( columns ) { - r = SELECT_AddColumn( sv, columns->column ); + r = SELECT_AddColumn( sv, columns->column, columns->table ); if( r ) break; columns = columns->next;
participants (1)
-
Alexandre Julliard