Mike McCormack : msi: Fix the ALTER and FREE keywords in the tokenizer.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Oct 31 05:43:09 CST 2006


Module: wine
Branch: master
Commit: 57443e01129a041b3adf2bc02d1089ff6d3c58f2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=57443e01129a041b3adf2bc02d1089ff6d3c58f2

Author: Mike McCormack <mike at codeweavers.com>
Date:   Tue Oct 31 14:33:05 2006 +0900

msi: Fix the ALTER and FREE keywords in the tokenizer.

---

 dlls/msi/tests/db.c |    4 ++--
 dlls/msi/tokenize.c |    5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c
index 134c12a..a445361 100644
--- a/dlls/msi/tests/db.c
+++ b/dlls/msi/tests/db.c
@@ -2754,7 +2754,6 @@ static void test_alter(void)
     cond = MsiDatabaseIsTablePersistent(hdb, "T");
     ok( cond == MSICONDITION_FALSE, "wrong return condition\n");
 
-    todo_wine {
     query = "ALTER TABLE `T` HOLD";
     r = run_query(hdb, 0, query);
     ok(r == ERROR_SUCCESS, "failed to hold table %d\n", r);
@@ -2766,8 +2765,8 @@ static void test_alter(void)
     query = "ALTER TABLE `T` FREE";
     r = run_query(hdb, 0, query);
     ok(r == ERROR_SUCCESS, "failed to free table\n");
-    }
 
+    todo_wine {
     query = "ALTER TABLE `T` FREE";
     r = run_query(hdb, 0, query);
     ok(r == ERROR_BAD_QUERY_SYNTAX, "failed to free table\n");
@@ -2775,6 +2774,7 @@ static void test_alter(void)
     query = "ALTER TABLE `T` HOLD";
     r = run_query(hdb, 0, query);
     ok(r == ERROR_BAD_QUERY_SYNTAX, "failed to hold table %d\n", r);
+    }
 
     MsiCloseHandle( hdb );
 
diff --git a/dlls/msi/tokenize.c b/dlls/msi/tokenize.c
index 6cd1dae..4866665 100644
--- a/dlls/msi/tokenize.c
+++ b/dlls/msi/tokenize.c
@@ -40,8 +40,8 @@ #define MAX_TOKEN_LEN 11
 
 static const WCHAR ABORT_W[] = { 'A','B','O','R','T',0 };
 static const WCHAR AFTER_W[] = { 'A','F','T','E','R',0 };
-static const WCHAR ALTER_W[] = { 'A','L','T','E','R',0 };
 static const WCHAR ALL_W[] = { 'A','L','L',0 };
+static const WCHAR ALTER_W[] = { 'A','L','T','E','R',0 };
 static const WCHAR AND_W[] = { 'A','N','D',0 };
 static const WCHAR AS_W[] = { 'A','S',0 };
 static const WCHAR ASC_W[] = { 'A','S','C',0 };
@@ -154,8 +154,8 @@ static const WCHAR WHERE_W[] = { 'W','H'
 static const Keyword aKeywordTable[] = {
   { ABORT_W, TK_ABORT },
   { AFTER_W, TK_AFTER },
-  { ALTER_W, TK_ALTER },
   { ALL_W, TK_ALL },
+  { ALTER_W, TK_ALTER },
   { AND_W, TK_AND },
   { AS_W, TK_AS },
   { ASC_W, TK_ASC },
@@ -192,6 +192,7 @@ static const Keyword aKeywordTable[] = {
   { FAIL_W, TK_FAIL },
   { FOR_W, TK_FOR },
   { FOREIGN_W, TK_FOREIGN },
+  { FREE_W, TK_FREE },
   { FROM_W, TK_FROM },
   { FULL_W, TK_JOIN_KW },
   { GLOB_W, TK_GLOB },




More information about the wine-cvs mailing list