[MDEV-7213] LIMIT clause is not passed to federated/connect table query Created: 2014-11-26 Updated: 2014-11-26 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Connect, Storage Engine - Federated |
| Affects Version/s: | 10.0.15 |
| Fix Version/s: | 10.1 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Takuya Kusumoto | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | upstream | ||
| Environment: |
Linux x86_64 |
||
| Description |
|
[Remote] [Local] I found that LIMIT clause is not passed to federated/connect table query and full table select is done in remove server. When simple select with LIMIT clause, lets say, "SELECT * FROM XXX LIMIT 100" out of 1bn records, simple full table select query is executed in remote server. (never finishes!) |
| Comments |
| Comment by Elena Stepanova [ 2014-11-26 ] |
|
Hi, It is an 8-year old MySQL bug http://bugs.mysql.com/bug.php?id=19054, and from what I see both in the bug status and in my installation of MySQL 5,6,21, the problem still exists there (I mean for Federated of course, since there is no Connect in MySQL). It is very easy to see just as described in the verification part of the upstream report, if you enable the general log on the remote side (where the underlying table lives). Lets say we have with some records in it, and on another server create table tfed (i int) ENGINE=FEDERATED CONNECTION='mysql://<other-server>/test/t1' Now, if you do you'll see that the remote server receives No LIMIT clause there at all. As I said, it works exactly the same way on MySQL 5.6.21. If you see it different, please provide some confirmation of it – logs, show status like 'Handler%' etc. |