http://bugs.winehq.org/show_bug.cgi?id=20227
Summary: msi: Table Join on two tables that have same (non-join) column name causes only first column data to be returned. Product: Wine Version: 1.1.30 Platform: All OS/Version: All Status: UNCONFIRMED Severity: major Priority: P2 Component: msi AssignedTo: wine-bugs@winehq.org ReportedBy: ngallaher+winehq@deepthought.org
Created an attachment (id=23863) --> (http://bugs.winehq.org/attachment.cgi?id=23863) Patch for TableJoin bug
Imagine the following tables
Table foo: string color string flavor
Table bar: string color string flavor
with query "Select foo.color, bar.flavor from foo, bar where foo.color=bar.color"
The current version returns the data from columns foo.color and foo.flavor. This is because when the tables are joined, the original tablename identifiers are dropped on the floor, resulting in a table with two 'color' and two 'flavor' columns. The VIEW_find_column() function then returns the first column found that matches the requested name.
This can be traced to a deficiency in VIEW_find_column() which only uses the column names in its comparison. Further, the sql parser does not preserve the table identifier, but this is easily fixed.
A patch, including test case is attached.
This behaviour was observed when trying to install Visual Studio 2008 Standard Edition.
http://bugs.winehq.org/show_bug.cgi?id=20227
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch, testcase
--- Comment #1 from Austin English austinenglish@gmail.com 2009-10-01 02:21:02 --- Good work! Send patches to wine-patches@winehq.org, they aren't picked up here.
http://bugs.winehq.org/show_bug.cgi?id=20227
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Platform|All |Other OS/Version|All |other Severity|major |normal
http://bugs.winehq.org/show_bug.cgi?id=20227
--- Comment #2 from Nate Gallaher ngallaher+winehq@deepthought.org 2009-10-01 08:40:51 --- Patch submitted to wine-patches@winehq.org
http://bugs.winehq.org/show_bug.cgi?id=20227
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dank@kegel.com Summary|msi: Table Join on two |msi: Table Join on two |tables that have same |tables that have same |(non-join) column name |(non-join) column name |causes only first column |causes only first column |data to be returned. |data to be returned. | |(Affects Visual Studio 2008 | |Standard Edition.)
http://bugs.winehq.org/show_bug.cgi?id=20227
--- Comment #3 from Dan Kegel dank@kegel.com 2009-10-20 23:08:37 --- Does this happen to affect 2005 standard edition as well?
http://bugs.winehq.org/show_bug.cgi?id=20227
--- Comment #4 from Nate Gallaher ngallaher+winehq@deepthought.org 2009-10-21 08:32:21 --- @dankegel Unkown. I do not have a copy of VS 2005 SE to test.
http://bugs.winehq.org/show_bug.cgi?id=20227
Hans Leidekker hans@meelstraat.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hans@meelstraat.net
--- Comment #5 from Hans Leidekker hans@meelstraat.net 2009-10-21 08:59:09 --- Nate, do you remember the query made by the 2008 installer? I happen to have a log from the 2005 edition lying around here.
http://bugs.winehq.org/show_bug.cgi?id=20227
--- Comment #6 from Nate Gallaher ngallaher+winehq@deepthought.org 2009-10-22 08:16:37 ---
From the log of VS2008SE:
SNIP>>>
0026:Call msi.MsiDatabaseOpenViewW(00000002,013316d8 L"Select InstallExecuteSequence.Action, InstallExecuteSequence.Condition from CustomAction, InstallExecuteSequence where CustomAction.Action = InstallExecuteSequence.Action and (CustomAction.Type = 51 or CustomAction.Type = 35) and InstallExecuteSequence.Sequence < 2000 order by InstallExecuteSequence.Sequence",0033b4d8) ret=39e4b06a <<<SNIP<<<
http://bugs.winehq.org/show_bug.cgi?id=20227
--- Comment #7 from Hans Leidekker hans@meelstraat.net 2009-10-22 08:52:48 --- This query does not appear in the log I have here from a 2005 trial version.
http://bugs.winehq.org/show_bug.cgi?id=20227
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #8 from Juan Lang juan_lang@yahoo.com 2009-10-27 10:50:27 --- Fixed by commit cc366e12829a20570b3d2e3cc508a8c861c722cb (I think.)
http://bugs.winehq.org/show_bug.cgi?id=20227
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Alexandre Julliard julliard@winehq.org 2009-11-13 12:44:28 --- Closing bugs fixed in 1.1.33.
http://bugs.winehq.org/show_bug.cgi?id=20227
Hans Leidekker hans@meelstraat.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |cc366e12829a20570b3d2e3cc50 | |8a8c861c722cb
https://bugs.winehq.org/show_bug.cgi?id=20227
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Hardware|Other |x86 Keywords| |download, Installer URL| |https://web.archive.org/web | |/20200226201149/http://down | |load.microsoft.com/download | |/8/1/d/81d3f35e-fa03-485b-9 | |53b-ff952e402520/VS2008ProE | |dition90dayTrialENUX1435622 | |.iso OS|other |Linux CC| |focht@gmx.net