MSI Query tests

EA Durbin ead1234 at
Thu Jun 1 19:22:31 CDT 2006

I've found a simple solution to this, not a fix for the SQL bug, but a fix 
for InstallFiles().

If you notice in where.txt, Im selecting * from media WHERE LastSequence > 
1. The default sort order for the results is by the table key of DiskId, 
which follows that of LastSequence.

Simply dropping the ORDER BY statement from the query in InstallFiles() 
causes it to return the results in order by table key of DiskId, using the 
WHERE statement where LastSequence > file->Sequence, so it never returns the 
LastSequence of 0, thus fixing the InstallFiles() bug.

>From: "EA Durbin" <ead1234 at>
>To: mike at
>CC: wine-devel at
>Subject: MSI Query tests
>Date: Thu, 01 Jun 2006 19:07:53 -0500
>I've written some tests to debug the MSI Installer in wine, in which I have 
>tested various SQL statements against the America's Army installer database 
>and iterated through the queries. Here are the results.
>It appears that in my attachment, where.txt, which is a standard where sql 
>SELECT * FROM `Media` WHERE `LastSequence` > 1 that it returns the SQL 
>statement correctly.
>Then in orderby.txt i query
>SELECT * FROM `Media` ORDER BY `LastSequence` and it returns the results as 
>Then in compoundsql.txt I query SELECT * FROM `Media` WHERE `LastSequence` 
> > 1 ORDER BY `LastSequence`, which is just as the statement appears in 
>In this query it ignores the WHERE CLAUSE and uses what is to the far right 
>, the ORDER BY LastSequence statement, which first grabs the LastSequence 
>of 0.
>In conclusion, the actual problem in InstallFiles() is the inability to 
>handle the compound SQL statement with a WHERE and an ORDER BY together.
>Unfortunately I don't understand wine's SQL underpinnings enough to where I 
>can implement a solution. I've looked it over and it appears somewhat 
>cryptic, so I will need some help.

><< compoundsql.txt >>

><< where.txt >>

><< orderby.txt >>


More information about the wine-devel mailing list