[2/4] msi: Disable an optimization in the execution of WHERE clauses.
Hans Leidekker
hans at codeweavers.com
Fri Jun 11 08:19:46 CDT 2010
There's no guarantee that the condition strings are in the string table.
---
dlls/msi/tests/db.c | 2 +-
dlls/msi/where.c | 4 ++++
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c
index 56fa0f0..5e8505a 100644
--- a/dlls/msi/tests/db.c
+++ b/dlls/msi/tests/db.c
@@ -1933,7 +1933,7 @@ static void test_where(void)
rec = 0;
query = "SELECT * FROM `Media` WHERE `DiskPrompt` <> 'Cabinet'";
r = do_query(hdb, query, &rec);
- todo_wine ok( r == ERROR_SUCCESS, "query failed: %d\n", r );
+ ok( r == ERROR_SUCCESS, "query failed: %d\n", r );
MsiCloseHandle( rec );
rec = 0;
diff --git a/dlls/msi/where.c b/dlls/msi/where.c
index 545d6a8..4c4db49 100644
--- a/dlls/msi/where.c
+++ b/dlls/msi/where.c
@@ -397,6 +397,9 @@ static UINT WHERE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
return ERROR_OUTOFMEMORY;
wv->row_count = 0;
+
+if (0) /* disable optimization, there's no guarantee that strings are in the string table */
+{
if (wv->cond->type == EXPR_STRCMP)
{
MSIITERHANDLE handle = NULL;
@@ -441,6 +444,7 @@ static UINT WHERE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
}
/* else fallback to slow case */
}
+}
for( i=0; i<count; i++ )
{
--
1.7.0.4
More information about the wine-patches
mailing list