msi: Disable an optimization in the execution of WHERE clauses.

There's no guarantee that the condition strings are in the string table.
This commit is contained in:
Hans Leidekker 2010-06-11 15:19:46 +02:00 committed by Alexandre Julliard
parent 15f5b9dca3
commit 73774b3ef8
2 changed files with 5 additions and 1 deletions

View File

@ -1933,7 +1933,7 @@ static void test_where(void)
rec = 0; rec = 0;
query = "SELECT * FROM `Media` WHERE `DiskPrompt` <> 'Cabinet'"; query = "SELECT * FROM `Media` WHERE `DiskPrompt` <> 'Cabinet'";
r = do_query(hdb, query, &rec); 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 ); MsiCloseHandle( rec );
rec = 0; rec = 0;

View File

@ -397,6 +397,9 @@ static UINT WHERE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
return ERROR_OUTOFMEMORY; return ERROR_OUTOFMEMORY;
wv->row_count = 0; 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) if (wv->cond->type == EXPR_STRCMP)
{ {
MSIITERHANDLE handle = NULL; MSIITERHANDLE handle = NULL;
@ -441,6 +444,7 @@ static UINT WHERE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
} }
/* else fallback to slow case */ /* else fallback to slow case */
} }
}
for( i=0; i<count; i++ ) for( i=0; i<count; i++ )
{ {