[Bug 20227] New: msi: Table Join on two tables that have same (non-join) column name causes only first column data to be returned.
wine-bugs at winehq.org
wine-bugs at winehq.org
Thu Oct 1 00:16:56 CDT 2009
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 at winehq.org
ReportedBy: ngallaher+winehq at 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.
--
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