From f3c8b83055d9c0680687353e1230f7f81533f8d5 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Mon, 19 Jul 2004 19:35:05 +0000 Subject: [PATCH] Fix the return code of MsiDatabaseOpenView. --- dlls/msi/action.c | 2 +- dlls/msi/msiquery.c | 2 +- dlls/msi/sql.y | 13 ++++++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 7b7f63cd418..74a6bf73c33 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -3107,7 +3107,7 @@ static UINT ACTION_InstallValidate(MSIPACKAGE *package) static UINT ACTION_LaunchConditions(MSIPACKAGE *package) { UINT rc; - MSIQUERY * view; + MSIQUERY * view = NULL; MSIRECORD * row = 0; static const WCHAR ExecSeqQuery[] = { 'S','E','L','E','C','T',' ','*',' ', diff --git a/dlls/msi/msiquery.c b/dlls/msi/msiquery.c index 4b82273b307..3984122e97f 100644 --- a/dlls/msi/msiquery.c +++ b/dlls/msi/msiquery.c @@ -152,7 +152,7 @@ UINT MSI_DatabaseOpenViewW(MSIDATABASE *db, } msiobj_release( &query->hdr ); - return ERROR_SUCCESS; + return r; } UINT WINAPI MsiDatabaseOpenViewW(MSIHANDLE hdb, diff --git a/dlls/msi/sql.y b/dlls/msi/sql.y index a1d3c989cb6..18600edb49d 100644 --- a/dlls/msi/sql.y +++ b/dlls/msi/sql.y @@ -342,7 +342,11 @@ unorderedsel: if( !$3 ) YYABORT; if( $2 ) + { $$ = do_one_select( sql->db, $3, $2 ); + if( !$$ ) + YYABORT; + } else $$ = $3; } @@ -354,7 +358,11 @@ unorderedsel: if( !view ) YYABORT; if( $3 ) + { view = do_one_select( sql->db, view, $3 ); + if( !view ) + YYABORT; + } DISTINCT_CreateView( sql->db, & $$, view ); } ; @@ -396,10 +404,13 @@ from: TK_FROM table { SQL_input* sql = (SQL_input*) info; + UINT r; $$ = NULL; TRACE("From table: %s\n",debugstr_w($2)); - TABLE_CreateView( sql->db, $2, & $$ ); + r = TABLE_CreateView( sql->db, $2, & $$ ); + if( r != ERROR_SUCCESS ) + YYABORT; } | TK_FROM table TK_WHERE expr { -- 2.11.4.GIT