mirror of
https://github.com/reactos/wine.git
synced 2025-02-22 05:40:50 +00:00
msi: Return an error from MsiDatabaseGetPrimaryKeys if the table does not exist.
This commit is contained in:
parent
0032706564
commit
18ebf2c576
@ -901,6 +901,9 @@ UINT MSI_DatabaseGetPrimaryKeys( MSIDATABASE *db,
|
||||
MSIQUERY *query = NULL;
|
||||
UINT r;
|
||||
|
||||
if (!TABLE_Exists( db, table ))
|
||||
return ERROR_INVALID_TABLE;
|
||||
|
||||
r = MSI_OpenQuery( db, &query, sql, table );
|
||||
if( r != ERROR_SUCCESS )
|
||||
return r;
|
||||
|
@ -589,6 +589,9 @@ static void test_fieldzero(void)
|
||||
|
||||
MsiCloseHandle(rec);
|
||||
|
||||
r = MsiDatabaseGetPrimaryKeysA(hdb, "nosuchtable", &rec);
|
||||
ok(r == ERROR_INVALID_TABLE, "Expected ERROR_INVALID_TABLE, got %d\n", r);
|
||||
|
||||
query = "SELECT * FROM `drone` WHERE `id` = 1";
|
||||
r = MsiDatabaseOpenView(hdb, query, &hview);
|
||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||
|
Loading…
x
Reference in New Issue
Block a user