msi: Fix the TEMPORARY keyword for columns.
This commit is contained in:
parent
14ab62306c
commit
77d3c59843
|
@ -108,7 +108,7 @@ static struct expr * EXPR_wildcard( void *info );
|
|||
%token TK_ROW TK_RP TK_RSHIFT
|
||||
%token TK_SELECT TK_SEMI TK_SET TK_SHORT TK_SLASH TK_SPACE TK_STAR TK_STATEMENT
|
||||
%token <str> TK_STRING
|
||||
%token TK_TABLE TK_TEMP TK_THEN TK_TRANSACTION TK_TRIGGER
|
||||
%token TK_TABLE TK_TEMPORARY TK_THEN TK_TRANSACTION TK_TRIGGER
|
||||
%token TK_UMINUS TK_UNCLOSED_STRING TK_UNION TK_UNIQUE
|
||||
%token TK_UPDATE TK_UPLUS TK_USING
|
||||
%token TK_VACUUM TK_VALUES TK_VIEW
|
||||
|
@ -171,7 +171,7 @@ oneinsert:
|
|||
YYABORT;
|
||||
$$ = insert;
|
||||
}
|
||||
| TK_INSERT TK_INTO table TK_LP selcollist TK_RP TK_VALUES TK_LP constlist TK_RP TK_TEMP
|
||||
| TK_INSERT TK_INTO table TK_LP selcollist TK_RP TK_VALUES TK_LP constlist TK_RP TK_TEMPORARY
|
||||
{
|
||||
SQL_input *sql = (SQL_input*) info;
|
||||
MSIVIEW *insert = NULL;
|
||||
|
@ -304,6 +304,10 @@ column_type:
|
|||
{
|
||||
$$ = $1 | MSITYPE_LOCALIZABLE;
|
||||
}
|
||||
| data_type_l TK_TEMPORARY
|
||||
{
|
||||
FIXME("temporary column\n");
|
||||
}
|
||||
;
|
||||
|
||||
data_type_l:
|
||||
|
|
|
@ -1955,27 +1955,29 @@ static void test_temporary_table(void)
|
|||
todo_wine {
|
||||
cond = MsiDatabaseIsTablePersistent(hdb, "P");
|
||||
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);
|
||||
ok(r == ERROR_SUCCESS, "failed to add table\n");
|
||||
}
|
||||
|
||||
cond = MsiDatabaseIsTablePersistent(hdb, "T");
|
||||
ok( cond == MSICONDITION_FALSE, "wrong return condition\n");
|
||||
|
||||
todo_wine {
|
||||
query = "CREATE TABLE `T2` ( `B` SHORT NOT NULL TEMPORARY, `C` CHAR(255) TEMPORARY PRIMARY KEY `C`)";
|
||||
r = run_query(hdb, 0, query);
|
||||
ok(r == ERROR_SUCCESS, "failed to add table\n");
|
||||
|
||||
todo_wine {
|
||||
cond = MsiDatabaseIsTablePersistent(hdb, "T2");
|
||||
ok( cond == MSICONDITION_NONE, "wrong return condition\n");
|
||||
}
|
||||
|
||||
query = "CREATE TABLE `T3` ( `B` SHORT NOT NULL TEMPORARY, `C` CHAR(255) PRIMARY KEY `C`)";
|
||||
r = run_query(hdb, 0, query);
|
||||
ok(r == ERROR_SUCCESS, "failed to add table\n");
|
||||
|
||||
todo_wine {
|
||||
cond = MsiDatabaseIsTablePersistent(hdb, "T3");
|
||||
ok( cond == MSICONDITION_TRUE, "wrong return condition\n");
|
||||
|
||||
|
@ -1987,6 +1989,9 @@ static void test_temporary_table(void)
|
|||
ok( cond == MSICONDITION_NONE, "wrong return condition\n");
|
||||
}
|
||||
|
||||
query = "CREATE TABLE `T5` ( `B` SHORT NOT NULL TEMP, `C` CHAR(255) TEMP PRIMARY KEY `C`) HOLD";
|
||||
r = run_query(hdb, 0, query);
|
||||
ok(r == ERROR_BAD_QUERY_SYNTAX, "failed to add table\n");
|
||||
MsiCloseHandle( hdb );
|
||||
|
||||
DeleteFile(msifile);
|
||||
|
|
|
@ -247,8 +247,7 @@ static const Keyword aKeywordTable[] = {
|
|||
{ SHORT_W, TK_SHORT },
|
||||
{ STATEMENT_W, TK_STATEMENT },
|
||||
{ TABLE_W, TK_TABLE },
|
||||
{ TEMP_W, TK_TEMP },
|
||||
{ TEMPORARY_W, TK_TEMP },
|
||||
{ TEMPORARY_W, TK_TEMPORARY },
|
||||
{ THEN_W, TK_THEN },
|
||||
{ TRANSACTION_W, TK_TRANSACTION },
|
||||
{ TRIGGER_W, TK_TRIGGER },
|
||||
|
|
Loading…
Reference in New Issue