[Bug 19337] New: MSI SQL string comparison operators incorrect...

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Jul 15 15:29:28 CDT 2009


http://bugs.winehq.org/show_bug.cgi?id=19337

           Summary: MSI SQL string comparison operators incorrect...
           Product: Wine
           Version: 1.1.21
          Platform: PC
        OS/Version: other
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: msi
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: toonces282002 at yahoo.com


In MSI, one can run SQL commands like this:

                "SELECT
`Dialog`,`Attributes`,`Control_First`,`Control_Default`,`Control_Cancel` FROM
`Dialog` WHERE `Dialog`< 'bar' OR `Dialog` > 'foo'"

Note however that the two conditions that we have placed on the name of the
dialog are technically incorrect.  According to Microsoft:

http://msdn.microsoft.com/en-us/library/aa372021(VS.85).aspx

"For string values, only the = or <> operations are possible. Object value
comparisons are limited to IS NULL and IS NOT NULL."

Accordingly, Microsoft treats the above expression as 'false', whereas msi on
ReactOS is actually using a strcmp to try and evaluate whether a string is
greater or less than another:

    *val = ( cond->u.expr.op == OP_EQ && ( sr == 0 ) ) ||
           ( cond->u.expr.op == OP_NE && ( sr != 0 ) ) ||
           ( cond->u.expr.op == OP_LT && ( sr < 0 ) ) ||
           ( cond->u.expr.op == OP_GT && ( sr > 0 ) );


My guess is that this conditional in where.c needs to be adjusted to match the
behavior on Windows.

Doing testing on ReactOS..

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list