You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
View Results provides incorrect results in columns TCountry, DCountry and Drivers. For example:
mysql> SELECT * FROM Results WHERE Team LIKE '%Thistlethwayte%';
+------+-----+-------+-------+-----------------+---------------------------------------------+-----------------+---------------------------------------------------------------------+-----------------------------+-----------------+--------+------+----------+--------------+----------------------+
| Race | Pos | Class | CarNb | TCountry | Team | DCountry | Drivers | Chassis | Engine | Tyre | Laps | Distance | RacingTime | Reason |
+------+-----+-------+-------+-----------------+---------------------------------------------+-----------------+---------------------------------------------------------------------+-----------------------------+-----------------+--------+------+----------+--------------+----------------------+
| 1926 | DNF | 3.0 | 9 | GBR|GBR|GBR|GBR | Bentley Motors Limited|Tommy Thistlethwayte | GBR|GBR|GBR|GBR | Tommy Thistlethwayte|Tommy Thistlethwayte|Clive Gallop|Clive Gallop | Bentley 3 Litre S |er Sport | Bentley 3.0L S4 | Dunlop | 105 | 1812.510 | 00:00:00.000 | Engine (rocker arm)
+------+-----+-------+-------+-----------------+---------------------------------------------+-----------------+---------------------------------------------------------------------+-----------------------------+-----------------+--------+------+----------+--------------+----------------------+
The information is duplicated, because the view joins many tables and multiplies the results when joining teams and drivers:
LEFT JOIN driver_results DR ON DR.result_id = RES.id
LEFT JOIN drivers D ON DR.driver_id = D.id
LEFT JOIN team_results TMR ON TMR.result_id = RES.id
LEFT JOIN teams TM ON TMR.team_id = TM.id
Column Team is not affected, because it uses DISTINCT. This could be applied on the other columns, but it would lead to countries list being shrunk while it should not (e.g. GBR|GBR|GBR|GBR above, should be GBR|GBR not just GBR).
The text was updated successfully, but these errors were encountered:
View
Results
provides incorrect results in columnsTCountry
,DCountry
andDrivers
. For example:The information is duplicated, because the view joins many tables and multiplies the results when joining teams and drivers:
Column
Team
is not affected, because it usesDISTINCT
. This could be applied on the other columns, but it would lead to countries list being shrunk while it should not (e.g.GBR|GBR|GBR|GBR
above, should beGBR|GBR
not justGBR
).The text was updated successfully, but these errors were encountered: