Module: wine Branch: master Commit: 37c5e0401013939c8e4c6eef1f9cf5a0b2a00e4e URL: http://source.winehq.org/git/wine.git/?a=commit;h=37c5e0401013939c8e4c6eef1f...
Author: James Hawkins truiken@gmail.com Date: Sun Mar 1 21:41:46 2009 -0800
msi: The _Streams and _Storages table are special and always exist.
---
dlls/msi/table.c | 8 +++++--- dlls/msi/tests/db.c | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/dlls/msi/table.c b/dlls/msi/table.c index 19a9915..ab86bcd 100644 --- a/dlls/msi/table.c +++ b/dlls/msi/table.c @@ -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 ); diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c index 641202b..ab10da9 100644 --- a/dlls/msi/tests/db.c +++ b/dlls/msi/tests/db.c @@ -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`)";