[MDEV-15463] CONNECT engine JDBC produces wrong query results Created: 2018-03-04 Updated: 2018-03-05 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Connect |
| Affects Version/s: | 10.2.13 |
| Fix Version/s: | 10.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Robert Dyas | Assignee: | Olivier Bertrand |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
centos7 |
||
| Description |
|
CONNECT engine JDBC produces wrong query results when 3 remote tables are joined:
The following query takes forever or times out (essentially fails):
The following query runs in 15 seconds and produced the correct results (only difference is LEFT JOIN vs JOIN... the one that works is the LEFT join below):
RESULTS:
The following query, which is the same as above but with 1 extra join, now produces INCORRECT results:
RESULTS:
|
| Comments |
| Comment by Olivier Bertrand [ 2018-03-05 ] | |||||
|
As allways, I cannot do much about such problems without being able to reproduce them. For this, I need the complete show create table of the CONNECT tables, the table definitions of the remote tables and, if possible, the data or a sample of the implied data. Anyway, doing joins locally on remote tables is cumbersome, especially on large tables. If all your tables are on the same remote location, it is much better to have the remote server executing such queries by defining a table on a view, for instance:
The SRCDEF being a query with the proper syntax, table and column names of the remote server. I am not sure the third query produces wrong results. The second join may return several lines for each line of the first join and the 10 limit may give the impression of wrong result. You can test that by replacing SELECT by SELECT DISTINCT. |