From: Hans Leidekker hans@it.vu.nl To: wine-devel@winehq.org CC: "EA Durbin" ead1234@hotmail.com Subject: Re: FW: RE: My 1.0 wish list Date: Sun, 4 Jun 2006 09:49:47 +0200
On Sunday 04 June 2006 09:08, EA Durbin wrote:
I wrote a quick test in wine/dlls/msi/tests/db.c to add a 2nd row to the
Could you share it?
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
Is the table in db.c comparable? Does it have the same fields and types? Also, you're using > in your select but the failing select statement has >= which may make a difference.
-Hans
It shouldnt matter whether its >= or >, they both return the wrong results in the actual msi installer and the right results in db.c.
I have enclosed my tests, I tested these against the America's Army database installer and I have double checked the actual contents of the msi file in ORCA.
I've packaged up some tests and included them with this email.
Here are some queries that have returned the wrong results
SELECT * FROM `Media` WHERE `LastSequence` > 15 SELECT * FROM `File` WHERE `Sequence` > 10
SELECT * FROM `Media` WHERE `LastSequence` >= 15 SELECT * FROM `File` WHERE `Sequence` >= 10
On Sunday 04 June 2006 11:01, EA Durbin wrote:
It shouldnt matter whether its >= or >, they both return the wrong results in the actual msi installer and the right results in db.c.
Does this patch help?
-Hans
diff --git a/dlls/msi/cond.y b/dlls/msi/cond.y index b32c417..47f858a 100644 --- a/dlls/msi/cond.y +++ b/dlls/msi/cond.y @@ -463,7 +463,7 @@ static INT compare_int( INT a, INT opera return a >= b; case COND_LE: case COND_ILE: - return a >= b; + return a <= b; case COND_SS: case COND_ISS: return ( a & b ) ? 1 : 0;
Nice Catch!!!
But unfortunately no, it doesn't fix the problem, the test SELECT * FROM TABLE WHERE testcondition >= testinteger is still returning the wrong results.
are we using the case COND_ILE when we compare for greater than or equal to? Or just when less than or equal to?
or does SELECT * FROM TABLE WHERE >= or > only call IGE or IGT?
From: Hans Leidekker hans@it.vu.nl To: "EA Durbin" ead1234@hotmail.com CC: wine-devel@winehq.org Subject: Re: FW: RE: My 1.0 wish list Date: Sun, 4 Jun 2006 11:29:49 +0200
On Sunday 04 June 2006 11:01, EA Durbin wrote:
It shouldnt matter whether its >= or >, they both return the wrong
results
in the actual msi installer and the right results in db.c.
Does this patch help?
-Hans
diff --git a/dlls/msi/cond.y b/dlls/msi/cond.y index b32c417..47f858a 100644 --- a/dlls/msi/cond.y +++ b/dlls/msi/cond.y @@ -463,7 +463,7 @@ static INT compare_int( INT a, INT opera return a >= b; case COND_LE: case COND_ILE:
return a >= b;
case COND_SS: case COND_ISS: return ( a & b ) ? 1 : 0;return a <= b;
I think i might actually see the problem. Let me test it.
In cond.tab.c the regexes are all wrong for matching the comparison tests.
{ {'~','<','=',0}, COND_IGE },
This should be parsing as
{ {'~','>','=',0}, COND_IGE },
and { {'~','<',0}, COND_IGT },
we're matching a less than sign, so if it is matching the "<" it runs COND_IGT it should be
{ {'~','>',0}, COND_IGT },
From: "EA Durbin" ead1234@hotmail.com To: hans@it.vu.nl, mike@codeweavers.com CC: wine-devel@winehq.org Subject: Re: FW: RE: My 1.0 wish list Date: Sun, 04 Jun 2006 11:59:25 -0500
Nice Catch!!!
But unfortunately no, it doesn't fix the problem, the test SELECT * FROM TABLE WHERE testcondition >= testinteger is still returning the wrong results.
are we using the case COND_ILE when we compare for greater than or equal to? Or just when less than or equal to?
or does SELECT * FROM TABLE WHERE >= or > only call IGE or IGT?
From: Hans Leidekker hans@it.vu.nl To: "EA Durbin" ead1234@hotmail.com CC: wine-devel@winehq.org Subject: Re: FW: RE: My 1.0 wish list Date: Sun, 4 Jun 2006 11:29:49 +0200
On Sunday 04 June 2006 11:01, EA Durbin wrote:
It shouldnt matter whether its >= or >, they both return the wrong
results
in the actual msi installer and the right results in db.c.
Does this patch help?
-Hans
diff --git a/dlls/msi/cond.y b/dlls/msi/cond.y index b32c417..47f858a 100644 --- a/dlls/msi/cond.y +++ b/dlls/msi/cond.y @@ -463,7 +463,7 @@ static INT compare_int( INT a, INT opera return a >= b; case COND_LE: case COND_ILE:
return a >= b;
case COND_SS: case COND_ISS: return ( a & b ) ? 1 : 0;return a <= b;
Why when i edit the code to change this, does it revert back when i compile it?
From: "EA Durbin" ead1234@hotmail.com To: ead1234@hotmail.com, hans@it.vu.nl, mike@codeweavers.com CC: wine-devel@winehq.org Subject: Re: FW: RE: My 1.0 wish list Date: Sun, 04 Jun 2006 12:12:18 -0500
I think i might actually see the problem. Let me test it.
In cond.tab.c the regexes are all wrong for matching the comparison tests.
{ {'~','<','=',0}, COND_IGE },
This should be parsing as
{ {'~','>','=',0}, COND_IGE },
and { {'~','<',0}, COND_IGT },
we're matching a less than sign, so if it is matching the "<" it runs COND_IGT it should be
{ {'~','>',0}, COND_IGT },
From: "EA Durbin" ead1234@hotmail.com To: hans@it.vu.nl, mike@codeweavers.com CC: wine-devel@winehq.org Subject: Re: FW: RE: My 1.0 wish list Date: Sun, 04 Jun 2006 11:59:25 -0500
Nice Catch!!!
But unfortunately no, it doesn't fix the problem, the test SELECT * FROM TABLE WHERE testcondition >= testinteger is still returning the wrong results.
are we using the case COND_ILE when we compare for greater than or equal to? Or just when less than or equal to?
or does SELECT * FROM TABLE WHERE >= or > only call IGE or IGT?
From: Hans Leidekker hans@it.vu.nl To: "EA Durbin" ead1234@hotmail.com CC: wine-devel@winehq.org Subject: Re: FW: RE: My 1.0 wish list Date: Sun, 4 Jun 2006 11:29:49 +0200
On Sunday 04 June 2006 11:01, EA Durbin wrote:
It shouldnt matter whether its >= or >, they both return the wrong
results
in the actual msi installer and the right results in db.c.
Does this patch help?
-Hans
diff --git a/dlls/msi/cond.y b/dlls/msi/cond.y index b32c417..47f858a 100644 --- a/dlls/msi/cond.y +++ b/dlls/msi/cond.y @@ -463,7 +463,7 @@ static INT compare_int( INT a, INT opera return a >= b; case COND_LE: case COND_ILE:
return a >= b;
case COND_SS: case COND_ISS: return ( a & b ) ? 1 : 0;return a <= b;
disregard that last stupid question, I looked at the Makefile. Like i said I'm not a C hacker, had to edit cond.y and not cond.tab.c.
From: "EA Durbin" ead1234@hotmail.com To: ead1234@hotmail.com, hans@it.vu.nl, mike@codeweavers.com CC: wine-devel@winehq.org Subject: Re: FW: RE: My 1.0 wish list Date: Sun, 04 Jun 2006 12:49:41 -0500
Why when i edit the code to change this, does it revert back when i compile it?
From: "EA Durbin" ead1234@hotmail.com To: ead1234@hotmail.com, hans@it.vu.nl, mike@codeweavers.com CC: wine-devel@winehq.org Subject: Re: FW: RE: My 1.0 wish list Date: Sun, 04 Jun 2006 12:12:18 -0500
I think i might actually see the problem. Let me test it.
In cond.tab.c the regexes are all wrong for matching the comparison tests.
{ {'~','<','=',0}, COND_IGE },
This should be parsing as
{ {'~','>','=',0}, COND_IGE },
and { {'~','<',0}, COND_IGT },
we're matching a less than sign, so if it is matching the "<" it runs COND_IGT it should be
{ {'~','>',0}, COND_IGT },
From: "EA Durbin" ead1234@hotmail.com To: hans@it.vu.nl, mike@codeweavers.com CC: wine-devel@winehq.org Subject: Re: FW: RE: My 1.0 wish list Date: Sun, 04 Jun 2006 11:59:25 -0500
Nice Catch!!!
But unfortunately no, it doesn't fix the problem, the test SELECT * FROM TABLE WHERE testcondition >= testinteger is still returning the wrong results.
are we using the case COND_ILE when we compare for greater than or equal to? Or just when less than or equal to?
or does SELECT * FROM TABLE WHERE >= or > only call IGE or IGT?
From: Hans Leidekker hans@it.vu.nl To: "EA Durbin" ead1234@hotmail.com CC: wine-devel@winehq.org Subject: Re: FW: RE: My 1.0 wish list Date: Sun, 4 Jun 2006 11:29:49 +0200
On Sunday 04 June 2006 11:01, EA Durbin wrote:
It shouldnt matter whether its >= or >, they both return the wrong
results
in the actual msi installer and the right results in db.c.
Does this patch help?
-Hans
diff --git a/dlls/msi/cond.y b/dlls/msi/cond.y index b32c417..47f858a 100644 --- a/dlls/msi/cond.y +++ b/dlls/msi/cond.y @@ -463,7 +463,7 @@ static INT compare_int( INT a, INT opera return a >= b; case COND_LE: case COND_ILE:
return a >= b;
case COND_SS: case COND_ISS: return ( a & b ) ? 1 : 0;return a <= b;
On Sun, Jun 04, 2006 at 12:49:41PM -0500, EA Durbin wrote:
Why when i edit the code to change this, does it revert back when i compile it?
You need to edit cond.y (bison generates cond.tab.c).
Huw.
I still can't fix it, perhaps you could have a deeper look Hans.
From: "EA Durbin" ead1234@hotmail.com To: ead1234@hotmail.com, hans@it.vu.nl, mike@codeweavers.com CC: wine-devel@winehq.org Subject: Re: FW: RE: My 1.0 wish list Date: Sun, 04 Jun 2006 12:49:41 -0500
Why when i edit the code to change this, does it revert back when i compile it?
From: "EA Durbin" ead1234@hotmail.com To: ead1234@hotmail.com, hans@it.vu.nl, mike@codeweavers.com CC: wine-devel@winehq.org Subject: Re: FW: RE: My 1.0 wish list Date: Sun, 04 Jun 2006 12:12:18 -0500
I think i might actually see the problem. Let me test it.
In cond.tab.c the regexes are all wrong for matching the comparison tests.
{ {'~','<','=',0}, COND_IGE },
This should be parsing as
{ {'~','>','=',0}, COND_IGE },
and { {'~','<',0}, COND_IGT },
we're matching a less than sign, so if it is matching the "<" it runs COND_IGT it should be
{ {'~','>',0}, COND_IGT },
From: "EA Durbin" ead1234@hotmail.com To: hans@it.vu.nl, mike@codeweavers.com CC: wine-devel@winehq.org Subject: Re: FW: RE: My 1.0 wish list Date: Sun, 04 Jun 2006 11:59:25 -0500
Nice Catch!!!
But unfortunately no, it doesn't fix the problem, the test SELECT * FROM TABLE WHERE testcondition >= testinteger is still returning the wrong results.
are we using the case COND_ILE when we compare for greater than or equal to? Or just when less than or equal to?
or does SELECT * FROM TABLE WHERE >= or > only call IGE or IGT?
From: Hans Leidekker hans@it.vu.nl To: "EA Durbin" ead1234@hotmail.com CC: wine-devel@winehq.org Subject: Re: FW: RE: My 1.0 wish list Date: Sun, 4 Jun 2006 11:29:49 +0200
On Sunday 04 June 2006 11:01, EA Durbin wrote:
It shouldnt matter whether its >= or >, they both return the wrong
results
in the actual msi installer and the right results in db.c.
Does this patch help?
-Hans
diff --git a/dlls/msi/cond.y b/dlls/msi/cond.y index b32c417..47f858a 100644 --- a/dlls/msi/cond.y +++ b/dlls/msi/cond.y @@ -463,7 +463,7 @@ static INT compare_int( INT a, INT opera return a >= b; case COND_LE: case COND_ILE:
return a >= b;
case COND_SS: case COND_ISS: return ( a & b ) ? 1 : 0;return a <= b;