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..
http://bugs.winehq.org/show_bug.cgi?id=19337
--- Comment #1 from Juan Lang juan_lang@yahoo.com 2009-07-15 16:16:01 --- Some test cases would help.
http://bugs.winehq.org/show_bug.cgi?id=19337
--- Comment #2 from Eric Youngdale toonces282002@yahoo.com 2009-07-15 20:36:18 --- Created an attachment (id=22398) --> (http://bugs.winehq.org/attachment.cgi?id=22398) Testcase to demostrate problem..
I am enclosing a testcase which demonstrates the problem. Essentially it just dumps the contents of a couple of tables - the SQL for each has a condition on it of some sort.
To run, simply run "msidump <msifile>" where you pick some msi file that you happen to have lying around. The theory is that the output of the program should be identical if you are running on windows and under Wine if you are using the same msi file.
On real Windows, I see it able to dump information from the Component, InstallExecuteSequence, CustomAction and Media tables. But because of the problem I noted where strings can only be compared for equality, the MsiDatabaseOpenView call fails for the Dialog and ControlEvent tables.
On ReactOS (using Wine dlls), the CustomAction, Media and Dialog tables are dumped. There is no output for the Component and InstallExecuteSequence tables for reasons that are unknown. The call to MsiDatabaseOpenView call for the ControlEvent table fails here in the same way as under real windows.
If you want me to upload a compiled binary of this testcase, I can do that too..
http://bugs.winehq.org/show_bug.cgi?id=19337
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID
--- Comment #3 from Vitaliy Margolen vitaliy@kievinfo.com 2009-07-15 21:53:31 --- Not Wine.
http://bugs.winehq.org/show_bug.cgi?id=19337
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Vitaliy Margolen vitaliy@kievinfo.com 2009-07-15 21:54:12 --- Closing. Retest with vanilla Wine. You are welcome to reopen if problem is present with Wine.
http://bugs.winehq.org/show_bug.cgi?id=19337
--- Comment #5 from Austin English austinenglish@gmail.com 2009-07-15 22:59:07 --- I think Juan had testcases for the wine tree in mind, e.g,. in dlls/msi/tests/db.c.
http://bugs.winehq.org/show_bug.cgi?id=19337
Eric Youngdale toonces282002@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |UNCONFIRMED Resolution|INVALID |
--- Comment #6 from Eric Youngdale toonces282002@yahoo.com 2009-07-16 14:09:40 --- I retested using Wine on Suse 11 Linux and Wine 1.1.25, and got the same result.
http://bugs.winehq.org/show_bug.cgi?id=19337
--- Comment #7 from Dmitry Timoshkov dmitry@codeweavers.com 2009-07-17 07:48:18 --- Please add a real test case to dlls/msi/tests.
http://bugs.winehq.org/show_bug.cgi?id=19337
Hans Leidekker hans@meelstraat.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hans@meelstraat.net
--- Comment #8 from Hans Leidekker hans@meelstraat.net 2009-12-15 14:14:36 --- Commit 6df6332198597aa0e03f9e15c9f4e8c883356f3b may help. Reporter, can you retry on current git?
http://bugs.winehq.org/show_bug.cgi?id=19337
Hans Leidekker hans@meelstraat.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #9 from Hans Leidekker hans@meelstraat.net 2011-03-17 08:41:31 CDT --- No answer from reporter in a long time, assuming fixed.
http://bugs.winehq.org/show_bug.cgi?id=19337
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #10 from Alexandre Julliard julliard@winehq.org 2011-03-18 14:39:20 CDT --- Closing bugs fixed in 1.3.16.