msi: The _Streams and _Storages table are special and always exist.

This commit is contained in:
James Hawkins 2009-03-01 21:41:46 -08:00 committed by Alexandre Julliard
parent c9b3bc1165
commit 37c5e04010
2 changed files with 7 additions and 5 deletions

View file

@ -1060,9 +1060,11 @@ BOOL TABLE_Exists( MSIDATABASE *db, LPCWSTR name )
UINT r, table_id = 0, i, count;
MSITABLE *table = NULL;
if( !lstrcmpW( name, szTables ) )
return TRUE;
if( !lstrcmpW( name, szColumns ) )
static const WCHAR szStreams[] = {'_','S','t','r','e','a','m','s',0};
static const WCHAR szStorages[] = {'_','S','t','o','r','a','g','e','s',0};
if( !lstrcmpW( name, szTables ) || !lstrcmpW( name, szColumns ) ||
!lstrcmpW( name, szStreams ) || !lstrcmpW( name, szStorages ) )
return TRUE;
r = msi_string2idW( db->strings, name, &table_id );

View file

@ -3965,12 +3965,12 @@ static void test_special_tables(void)
query = "CREATE TABLE `_Storages` ( "
"`foo` INT NOT NULL, `bar` INT LOCALIZABLE PRIMARY KEY `foo`)";
r = run_query(hdb, 0, query);
todo_wine ok(r == ERROR_BAD_QUERY_SYNTAX, "created _Streams table\n");
ok(r == ERROR_BAD_QUERY_SYNTAX, "created _Streams table\n");
query = "CREATE TABLE `_Streams` ( "
"`foo` INT NOT NULL, `bar` INT LOCALIZABLE PRIMARY KEY `foo`)";
r = run_query(hdb, 0, query);
todo_wine ok(r == ERROR_BAD_QUERY_SYNTAX, "created _Streams table\n");
ok(r == ERROR_BAD_QUERY_SYNTAX, "created _Streams table\n");
query = "CREATE TABLE `_Tables` ( "
"`foo` INT NOT NULL, `bar` INT LOCALIZABLE PRIMARY KEY `foo`)";