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@winehq.org ReportedBy: toonces282002@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..