mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 02:46:32 +00:00
msi: All columns being temporary means the table is non-persistent.
The HOLD keyword just means that the non-persistent data in the table should be kept around, not that the table is temporary.
This commit is contained in:
parent
44f7cb8858
commit
697d820eee
4 changed files with 17 additions and 6 deletions
|
@ -146,10 +146,12 @@ static UINT check_columns( column_info *col_info )
|
|||
}
|
||||
|
||||
UINT CREATE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR table,
|
||||
column_info *col_info, BOOL temp )
|
||||
column_info *col_info, BOOL hold )
|
||||
{
|
||||
MSICREATEVIEW *cv = NULL;
|
||||
UINT r;
|
||||
const column_info *col;
|
||||
BOOL temp = TRUE;
|
||||
|
||||
TRACE("%p\n", cv );
|
||||
|
||||
|
@ -161,6 +163,13 @@ UINT CREATE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR table,
|
|||
if( !cv )
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
|
||||
for( col = col_info; col; col = col->next )
|
||||
if( !col->temporary )
|
||||
{
|
||||
temp = FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
/* fill the structure */
|
||||
cv->view.ops = &create_ops;
|
||||
msiobj_addref( &db->hdr );
|
||||
|
|
|
@ -66,6 +66,7 @@ typedef struct _column_info
|
|||
LPCWSTR table;
|
||||
LPCWSTR column;
|
||||
UINT type;
|
||||
BOOL temporary;
|
||||
struct expr *val;
|
||||
struct _column_info *next;
|
||||
} column_info;
|
||||
|
@ -108,7 +109,7 @@ UINT WHERE_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table,
|
|||
struct expr *cond );
|
||||
|
||||
UINT CREATE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR table,
|
||||
column_info *col_info, BOOL temp );
|
||||
column_info *col_info, BOOL hold );
|
||||
|
||||
UINT INSERT_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR table,
|
||||
column_info *columns, column_info *values, BOOL temp );
|
||||
|
|
|
@ -40,6 +40,8 @@ static int sql_error(const char *str);
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
#define MSITYPE_TEMPORARY 0x8000
|
||||
|
||||
typedef struct tag_SQL_input
|
||||
{
|
||||
MSIDATABASE *db;
|
||||
|
@ -278,7 +280,8 @@ column_and_type:
|
|||
column column_type
|
||||
{
|
||||
$$ = $1;
|
||||
$$->type = $2 | MSITYPE_VALID;
|
||||
$$->type = ($2 | MSITYPE_VALID) & ~MSITYPE_TEMPORARY;
|
||||
$$->temporary = $2 & MSITYPE_TEMPORARY ? TRUE : FALSE;
|
||||
}
|
||||
;
|
||||
|
||||
|
@ -293,7 +296,7 @@ column_type:
|
|||
}
|
||||
| data_type_l TK_TEMPORARY
|
||||
{
|
||||
FIXME("temporary column\n");
|
||||
$$ = $1 | MSITYPE_TEMPORARY;
|
||||
}
|
||||
;
|
||||
|
||||
|
|
|
@ -2664,10 +2664,8 @@ static void test_temporary_table(void)
|
|||
r = run_query(hdb, 0, query);
|
||||
ok(r == ERROR_SUCCESS, "failed to add table\n");
|
||||
|
||||
todo_wine {
|
||||
cond = MsiDatabaseIsTablePersistent(hdb, "P2");
|
||||
ok( cond == MSICONDITION_TRUE, "wrong return condition\n");
|
||||
}
|
||||
|
||||
query = "CREATE TABLE `T` ( `B` SHORT NOT NULL TEMPORARY, `C` CHAR(255) TEMPORARY PRIMARY KEY `C`) HOLD";
|
||||
r = run_query(hdb, 0, query);
|
||||
|
|
Loading…
Reference in a new issue