Hello,
As somebody asked me whether I could try to use MSN Beta 8, I decided to
give it a try; The installer quits at some point, caused by an unhandled
SQL command "ALTER TABLE `Registry` HOLD"
I decided to have a look at this, but I'm not familiar with msi, and my
SQL knowledge isn't very big either; anyway, I added a few lines to the
parser; now -- how could I find how to implement something for this?
Regards,
Joris
diff --git a/dlls/msi/sql.y b/dlls/msi/sql.y
index 86ebe30..f8c9f40 100644
--- a/dlls/msi/sql.y
+++ b/dlls/msi/sql.y
@@ -79,7 +79,7 @@ static struct expr * EXPR_wildcard( void
int integer;
}
-%token TK_ABORT TK_AFTER TK_AGG_FUNCTION TK_ALL TK_AND TK_AS TK_ASC
+%token TK_ABORT TK_AFTER TK_ALTER TK_AGG_FUNCTION TK_ALL TK_AND TK_AS TK_ASC
%token TK_BEFORE TK_BEGIN TK_BETWEEN TK_BITAND TK_BITNOT TK_BITOR TK_BY
%token TK_CASCADE TK_CASE TK_CHAR TK_CHECK TK_CLUSTER TK_COLLATE TK_COLUMN
%token TK_COMMA TK_COMMENT TK_COMMIT TK_CONCAT TK_CONFLICT
@@ -127,7 +127,7 @@ static struct expr * EXPR_wildcard( void
%type <column_list> selcollist column column_and_type column_def table_def
%type <column_list> column_assignment update_assign_list constlist
%type <query> query from fromtable selectfrom unorderedsel
-%type <query> oneupdate onedelete oneselect onequery onecreate oneinsert
+%type <query> oneupdate onedelete oneselect onequery onecreate oneinsert onealter
%type <expr> expr val column_val const_val
%type <column_type> column_type data_type data_type_l data_count
%type <integer> number
@@ -156,6 +156,7 @@ onequery:
| oneinsert
| oneupdate
| onedelete
+ | onealter
;
oneinsert:
@@ -235,6 +236,14 @@ onedelete:
}
;
+onealter:
+ TK_ALTER TK_TABLE table TK_HOLD
+ {
+ FIXME("Unimplemented: ALTER TABLE, HOLD\n");
+ $$ = NULL;
+ }
+ ;
+
table_def:
column_def TK_PRIMARY TK_KEY selcollist
{
@@ -807,7 +816,7 @@ UINT MSI_ParseSQL( MSIDATABASE *db, LPCW
sql.len = 0;
sql.view = phview;
sql.mem = mem;
-
+
r = SQL_parse(&sql);
TRACE("Parse returned %d\n", r);
diff --git a/dlls/msi/tokenize.c b/dlls/msi/tokenize.c
index 05c3cda..9b628c0 100644
--- a/dlls/msi/tokenize.c
+++ b/dlls/msi/tokenize.c
@@ -45,6 +45,7 @@ struct Keyword {
static const Keyword aKeywordTable[] = {
{ "ABORT", TK_ABORT },
{ "AFTER", TK_AFTER },
+ { "ALTER", TK_ALTER },
{ "ALL", TK_ALL },
{ "AND", TK_AND },
{ "AS", TK_AS },