1

I use SQLyog Community edition and like many other SQL applications out there it puts a 1000 result limit on queries that do not have a limit provided.

I am wondering why MySQL doesn't have an explicit NO LIMIT option when it comes to writing queries.

I'm sure that i'm not the only developer that ends up sticking a large limit on the end (within reason) to get a full display view of the records in the table.

Providing the records in the table is sensible i'd like to be able to do:

SELECT * FROM course NO LIMIT; instead of SELECT * FROM COURSE LIMIT 2500;

asked Apr 2, 2014 at 10:50
1
  • I don't think its very reasonable to expect MySQL to change their query language because of how some tools choose to implement a feature. Commented Apr 2, 2014 at 15:42

1 Answer 1

8

The server was probably started with the --safe-updates or --i-am-a-dummy option which causes MySQL to execute

SET sql_safe_updates=1, sql_select_limit=1000, max_join_size=1000000;

on startup.

See the MySQL reference for details.

answered Apr 2, 2014 at 11:14
2
  • Turns out I am not running MySQL server with Safe Updates on. I done a SHOW VARIABLES LIKE 'sql_safe_updates' from the command line and it did not return any results, however I found a setting in SQLyog that limited results to 1000. I guess it still poses the question; why doesn't MySQL have a "NO LIMIT" option? You could legitimately want to ignore all limits for one specific query, but still run in Safe Update mode the rest of the time. Commented Apr 2, 2014 at 15:28
  • 2
    MySQL doesn't have a NO LIMIT option because all queries run without a limit by default. If you decide to restrict that elsewhere, there's nothing MySQL could do about that. Commented Apr 2, 2014 at 17:19

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.