Question

SQLyog automatically appending LIMIT 0, 1000 to all queries in a database which is causing the below query (select next_hi from hibernate_unique_key for update) to fail.

Query : select next_hi from hibernate_unique_key for update  **LIMIT 0, 1000**
Error Code : 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, 1000' at line 2

The same is not happening in other database. Where to check and solve this problem?

UPDATE: It seems SQLyog is appending the LIMIT clause, no problem from hibernate or command prompt. But it is happening in only one database not happening in the other database.

Was it helpful?

Solution

This was a bug which was fixed in SQLyog 8.4. SQLyog bug fix(8.4)-- On executing SELECT statements having clauses like PROCEDURE, INTO FILE, FOR UPDATE, etc., SQLyog was adding LIMIT clause if result tab paging option is enabled. The latest version of SQLyog can be found here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top