SQLYog 自动将 LIMIT 0, 1000 附加到所有查询
SQLyog 自动将 LIMIT 0, 1000 附加到数据库中的所有查询,这导致以下查询(select next_hi from hibernate_unique_key for update
)失败。
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
其他数据库中没有发生同样的情况。到哪里检查并解决这个问题呢?
更新:看起来 SQLyog 正在附加 LIMIT 子句,从休眠或命令提示符没有问题。 但它只发生在一个数据库中,而没有发生在另一个数据库中。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个错误,已在 SQLyog 8.4 中修复。 SQLyog 错误修复 (8.4) - 在执行具有 PROCEDURE、INTO FILE、FOR UPDATE 等子句的 SELECT 语句时,如果启用结果选项卡分页选项,SQLyog 会添加 LIMIT 子句。最新版本的 SQLyog 可以在此处找到。
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.