msi: The _Streams and _Storages table are special and always exist.
This commit is contained in:
parent
c9b3bc1165
commit
37c5e04010
|
@ -1060,9 +1060,11 @@ BOOL TABLE_Exists( MSIDATABASE *db, LPCWSTR name )
|
||||||
UINT r, table_id = 0, i, count;
|
UINT r, table_id = 0, i, count;
|
||||||
MSITABLE *table = NULL;
|
MSITABLE *table = NULL;
|
||||||
|
|
||||||
if( !lstrcmpW( name, szTables ) )
|
static const WCHAR szStreams[] = {'_','S','t','r','e','a','m','s',0};
|
||||||
return TRUE;
|
static const WCHAR szStorages[] = {'_','S','t','o','r','a','g','e','s',0};
|
||||||
if( !lstrcmpW( name, szColumns ) )
|
|
||||||
|
if( !lstrcmpW( name, szTables ) || !lstrcmpW( name, szColumns ) ||
|
||||||
|
!lstrcmpW( name, szStreams ) || !lstrcmpW( name, szStorages ) )
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
r = msi_string2idW( db->strings, name, &table_id );
|
r = msi_string2idW( db->strings, name, &table_id );
|
||||||
|
|
|
@ -3965,12 +3965,12 @@ static void test_special_tables(void)
|
||||||
query = "CREATE TABLE `_Storages` ( "
|
query = "CREATE TABLE `_Storages` ( "
|
||||||
"`foo` INT NOT NULL, `bar` INT LOCALIZABLE PRIMARY KEY `foo`)";
|
"`foo` INT NOT NULL, `bar` INT LOCALIZABLE PRIMARY KEY `foo`)";
|
||||||
r = run_query(hdb, 0, query);
|
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` ( "
|
query = "CREATE TABLE `_Streams` ( "
|
||||||
"`foo` INT NOT NULL, `bar` INT LOCALIZABLE PRIMARY KEY `foo`)";
|
"`foo` INT NOT NULL, `bar` INT LOCALIZABLE PRIMARY KEY `foo`)";
|
||||||
r = run_query(hdb, 0, query);
|
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` ( "
|
query = "CREATE TABLE `_Tables` ( "
|
||||||
"`foo` INT NOT NULL, `bar` INT LOCALIZABLE PRIMARY KEY `foo`)";
|
"`foo` INT NOT NULL, `bar` INT LOCALIZABLE PRIMARY KEY `foo`)";
|
||||||
|
|
Loading…
Reference in New Issue