James Hawkins : msi: Fix joining a nonexistent table with another table.

Alexandre Julliard julliard at winehq.org
Thu Apr 3 05:43:50 CDT 2008


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

Author: James Hawkins <jhawkins at codeweavers.com>
Date:   Wed Apr  2 18:31:18 2008 -0500

msi: Fix joining a nonexistent table with another table.

---

 dlls/msi/join.c     |    3 ++-
 dlls/msi/tests/db.c |    5 +++++
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/dlls/msi/join.c b/dlls/msi/join.c
index e24eace..756db6f 100644
--- a/dlls/msi/join.c
+++ b/dlls/msi/join.c
@@ -341,7 +341,8 @@ UINT JOIN_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR tables )
         r = TABLE_CreateView( db, tables, &table->view );
         if( r != ERROR_SUCCESS )
         {
-            ERR("can't create table\n");
+            WARN("can't create table: %s\n", debugstr_w(tables));
+            r = ERROR_BAD_QUERY_SYNTAX;
             goto end;
         }
 
diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c
index aee2e80..9be1691 100644
--- a/dlls/msi/tests/db.c
+++ b/dlls/msi/tests/db.c
@@ -3213,6 +3213,11 @@ static void test_join(void)
     MsiViewClose(hview);
     MsiCloseHandle(hview);
 
+    query = "SELECT * FROM `Nonexistent`, `One`";
+    r = MsiDatabaseOpenView(hdb, query, &hview);
+    ok( r == ERROR_BAD_QUERY_SYNTAX,
+        "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r );
+
     MsiCloseHandle(hdb);
     DeleteFile(msifile);
 }




More information about the wine-cvs mailing list