MSI: fix the return code of MsiDatabaseOpenView
Mike McCormack
mike at codeweavers.com
Sun Jul 18 21:23:02 CDT 2004
When installing msxml3usa.msi, msi.dll was crashing because we would
unconditionally return success in MSI_DatabaseOpenView. Now the install
of MS XML 3 still fails, but it doesn't crash.
Thanks to Mike Hearn for spotting this bug.
Mike
ChangeLog:
* fix the return code of MsiDatabaseOpenView
-------------- next part --------------
Index: dlls/msi/action.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/action.c,v
retrieving revision 1.30
diff -u -r1.30 action.c
--- dlls/msi/action.c 16 Jul 2004 19:15:40 -0000 1.30
+++ dlls/msi/action.c 19 Jul 2004 01:06:13 -0000
@@ -3107,7 +3107,7 @@
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',' ','*',' ',
Index: dlls/msi/msiquery.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/msiquery.c,v
retrieving revision 1.14
diff -u -r1.14 msiquery.c
--- dlls/msi/msiquery.c 9 Jul 2004 22:25:34 -0000 1.14
+++ dlls/msi/msiquery.c 19 Jul 2004 01:06:13 -0000
@@ -152,7 +152,7 @@
}
msiobj_release( &query->hdr );
- return ERROR_SUCCESS;
+ return r;
}
UINT WINAPI MsiDatabaseOpenViewW(MSIHANDLE hdb,
Index: dlls/msi/sql.y
===================================================================
RCS file: /home/wine/wine/dlls/msi/sql.y,v
retrieving revision 1.16
diff -u -r1.16 sql.y
--- dlls/msi/sql.y 4 Jul 2004 00:30:02 -0000 1.16
+++ dlls/msi/sql.y 19 Jul 2004 01:06:14 -0000
@@ -342,7 +342,11 @@
if( !$3 )
YYABORT;
if( $2 )
+ {
$$ = do_one_select( sql->db, $3, $2 );
+ if( !$$ )
+ YYABORT;
+ }
else
$$ = $3;
}
@@ -354,7 +358,11 @@
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 @@
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
{
More information about the wine-patches
mailing list