Bug #3652 Simple query with "limit" drops db connection
Submitted: 4 May 2004 18:20 Modified: 4 May 2004 18:33
Reporter: Igor Kolomiets Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / J Severity:S2 (Serious)
Version:3.0.11-stable OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[4 May 2004 18:20] Igor Kolomiets
Description:
Tested with DbVisualizer 4.1 and latest mysql java connector version 3.0.11.

A simple query like: "select 1 from domains limit 1,1" on non-empty table drops
db connection and print out: Communication link failure, message from server:
"Unknown command" error.

How to repeat:
N/A
[4 May 2004 18:33] Mark Matthews
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.mysql.com/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to 'Open'.

Thank you for your interest in MySQL.
[4 May 2004 18:33] Mark Matthews
What version of the _server_ are you using?
[4 May 2004 19:15] Igor Kolomiets
> What version of the _server_ are you using?

Sorry. It's:

/usr/sbin/mysqld -v
/usr/sbin/mysqld  Ver 3.23.49 for pc-linux-gnu on i686
[23 Aug 2005 19:03] [ name withheld ]
This is a limitation of DBVisualizer, not MySQL or MySQL Connector/J.  

DBVisualizer adds a "LIMIT" clause to all SQL queries if you specify a number in the "Max Rows" field (lower right corner on DBVisualizer).

If you remove the number or set it to 0, DBVisualizer will not add its own "LIMIT" clause and your SELECT will execute normally.