[MDEV-6987] Auto-limit on interactive queries Created: 2014-10-30 Updated: 2017-06-15 Resolved: 2014-12-15 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | OTHER |
| Fix Version/s: | N/A |
| Type: | Task | Priority: | Minor |
| Reporter: | Olaf van der Spek | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When trying queries in the interactive client I frequently add limit 25 (or have to hit Ctrl-C). |
| Comments |
| Comment by Sergei Golubchik [ 2014-11-08 ] | ||||||||||||||||||||
|
Did you try setting @@sql_select_limit variable? If you want to execute the entire query but only display top 25 rows, you can set the pager as
| ||||||||||||||||||||
| Comment by Olaf van der Spek [ 2014-11-13 ] | ||||||||||||||||||||
|
No, I didn't, thx for the hint. | ||||||||||||||||||||
| Comment by Sergei Golubchik [ 2014-11-13 ] | ||||||||||||||||||||
|
I cannot think of any SQL way to check whether a session is interactive or not, so no SQL init-script would do. Perhaps the easiest way would be something like
| ||||||||||||||||||||
| Comment by Olaf van der Spek [ 2017-06-15 ] | ||||||||||||||||||||
|
Perhaps the client itself shouldn't display more then X lines by default when in interactive mode. Then the server doesn't have to know.. |