FW: RE: My 1.0 wish list

EA Durbin ead1234 at hotmail.com
Sun Jun 4 02:08:41 CDT 2006

The bug is in file.c under ready_media_for_file() at the query statement.

I hacked the actual wine code and ran some queries aganist actual msi 
installer databases. I tested a couple different queries in the actual wine 
installer against actual msi databases on a couple different tables to 
diagnose the problem, then I iterated through the results returned by the 
queries. Here are my findings:

SELECT * FROM `MEDIA` - works fine
SELECT * FROM `MEDIA` ORDER BY `LastSequence` - works fine
SELECT * FROM `FILES` - works fine
SELECT * FROM `FILES` ORDER BY `Sequence` - works fine

SELECT * FROM `FILES` WHERE `Sequence` >= 10 - upon viewing results it 
returns Sequences 1 through 10 - failed
SELECT * FROM `Media` WHERE `LastSequence` >= any number you wish - fails 
and returns LastSequence numbers from the table, less than the number in 
your comparison.

This means that the bug is either in the WHERE clause, or the conditional 
statement immediately after the WHERE clause. I'm not sure, and I don't feel 
like spending another 10 hours learning how the underlying SQL code in wine 
works or learning how Bison parses things as the underlying code is even 
more confusing than what I've looked at so far, but I've narrowed down where 
the bug is, and what part of the query fails at in particular.

I wrote a quick test in wine/dlls/msi/tests/db.c to add a 2nd row to the 
database that was being created, then I inserted the `id` of 8 into it and 
then I ran the query SELECT * FROM phone where `id` > 6, and it returned the 
correct results with `id` of 8. But in the actual wine installer code a 
similar query doesn't return the correct results. I don't know if its 
because the wine installer is taking the query as a character array and it 
isn't in db.c, or if files.c is doing other things than in db.c, but I 
couldn't replicate it in db.c and I give up, the query is broken in the 
actual installer code, and when Iterating through the results it returns the 
wrong results from  tables.

>From: Hans Leidekker <hans at it.vu.nl>
>To: wine-devel at winehq.org
>CC: "EA Durbin" <ead1234 at hotmail.com>
>Subject: Re: FW: RE: My 1.0 wish list
>Date: Sat, 3 Jun 2006 20:30:16 +0200
>On Saturday 03 June 2006 18:45, EA Durbin wrote:
> > That can't be used for a test case, for a test case I, or most likely
> > someone elsewho has the ability and the time has to write code under
> > dlls/msi/tests/db.c and make a program in windows to re-illustrate this
> > bug.
>Do you know SQL? Could you write a few SQL statements that reproduce
>the exact conditions of the bug? I'm thinking of something like this:
>  1) create a table
>  2) insert a few rows
>  3) select a row from the table
>If you do, I'll have a go at writing a test case for it.
>  -Hans

More information about the wine-devel mailing list