mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
msi: Don't add info to the _Columns table for non-persistent tables.
This commit is contained in:
parent
23379b3b5c
commit
a33cc3d859
@ -670,7 +670,7 @@ UINT msi_create_table( MSIDATABASE *db, LPCWSTR name, column_info *col_info,
|
||||
if( r )
|
||||
goto err;
|
||||
|
||||
r = tv->ops->insert_row( tv, rec, FALSE );
|
||||
r = tv->ops->insert_row( tv, rec, !persistent );
|
||||
TRACE("insert_row returned %x\n", r);
|
||||
if( r )
|
||||
goto err;
|
||||
@ -680,51 +680,54 @@ UINT msi_create_table( MSIDATABASE *db, LPCWSTR name, column_info *col_info,
|
||||
|
||||
msiobj_release( &rec->hdr );
|
||||
|
||||
/* add each column to the _Columns table */
|
||||
r = TABLE_CreateView( db, szColumns, &tv );
|
||||
if( r )
|
||||
return r;
|
||||
|
||||
r = tv->ops->execute( tv, 0 );
|
||||
TRACE("tv execute returned %x\n", r);
|
||||
if( r )
|
||||
goto err;
|
||||
|
||||
rec = MSI_CreateRecord( 4 );
|
||||
if( !rec )
|
||||
goto err;
|
||||
|
||||
r = MSI_RecordSetStringW( rec, 1, name );
|
||||
if( r )
|
||||
goto err;
|
||||
|
||||
/*
|
||||
* need to set the table, column number, col name and type
|
||||
* for each column we enter in the table
|
||||
*/
|
||||
nField = 1;
|
||||
for( col = col_info; col; col = col->next )
|
||||
if( persistent )
|
||||
{
|
||||
r = MSI_RecordSetInteger( rec, 2, nField );
|
||||
/* add each column to the _Columns table */
|
||||
r = TABLE_CreateView( db, szColumns, &tv );
|
||||
if( r )
|
||||
return r;
|
||||
|
||||
r = tv->ops->execute( tv, 0 );
|
||||
TRACE("tv execute returned %x\n", r);
|
||||
if( r )
|
||||
goto err;
|
||||
|
||||
r = MSI_RecordSetStringW( rec, 3, col->column );
|
||||
rec = MSI_CreateRecord( 4 );
|
||||
if( !rec )
|
||||
goto err;
|
||||
|
||||
r = MSI_RecordSetStringW( rec, 1, name );
|
||||
if( r )
|
||||
goto err;
|
||||
|
||||
r = MSI_RecordSetInteger( rec, 4, col->type );
|
||||
if( r )
|
||||
goto err;
|
||||
/*
|
||||
* need to set the table, column number, col name and type
|
||||
* for each column we enter in the table
|
||||
*/
|
||||
nField = 1;
|
||||
for( col = col_info; col; col = col->next )
|
||||
{
|
||||
r = MSI_RecordSetInteger( rec, 2, nField );
|
||||
if( r )
|
||||
goto err;
|
||||
|
||||
r = tv->ops->insert_row( tv, rec, !persistent );
|
||||
if( r )
|
||||
goto err;
|
||||
r = MSI_RecordSetStringW( rec, 3, col->column );
|
||||
if( r )
|
||||
goto err;
|
||||
|
||||
nField++;
|
||||
r = MSI_RecordSetInteger( rec, 4, col->type );
|
||||
if( r )
|
||||
goto err;
|
||||
|
||||
r = tv->ops->insert_row( tv, rec, FALSE );
|
||||
if( r )
|
||||
goto err;
|
||||
|
||||
nField++;
|
||||
}
|
||||
if( !col )
|
||||
r = ERROR_SUCCESS;
|
||||
}
|
||||
if( !col )
|
||||
r = ERROR_SUCCESS;
|
||||
|
||||
err:
|
||||
if (rec)
|
||||
|
@ -2730,7 +2730,6 @@ static void test_temporary_table(void)
|
||||
ok( r == ERROR_SUCCESS, "temporary table exists in _Tables\n");
|
||||
MsiCloseHandle( rec );
|
||||
|
||||
todo_wine {
|
||||
/* query the column data */
|
||||
rec = 0;
|
||||
r = do_query(hdb, "select * from `_Columns` where `Table` = 'T' AND `Name` = 'B'", &rec);
|
||||
@ -2740,7 +2739,6 @@ static void test_temporary_table(void)
|
||||
r = do_query(hdb, "select * from `_Columns` where `Table` = 'T' AND `Name` = 'C'", &rec);
|
||||
ok( r == ERROR_NO_MORE_ITEMS, "temporary table exists in _Columns\n");
|
||||
if (rec) MsiCloseHandle( rec );
|
||||
}
|
||||
|
||||
MsiCloseHandle( hdb );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user