Commit 18ebf2c5 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Return an error from MsiDatabaseGetPrimaryKeys if the table does not exist.

parent 00327065
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment