Bug #2129 LIMIT 0, -1 does not work.
Submitted: 16 Dec 2003 4:16 Modified: 16 Dec 2003 9:15
Reporter: [ name withheld ] Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.1 OS:Linux (Linux (x86))
Assigned to: CPU Architecture:Any

[16 Dec 2003 4:16] [ name withheld ]
Description:
According to the manual, "LIMIT 0, -1" should return
unlimited number (-1) of records from the beginning (0).

This was true in MySQL-4.0.15.

But mysql-4.1.1 cannot recognize this simple SQL correctly.

How to repeat:
mysql> create table foo (id INT);
Query OK, 0 rows affected (0.00 sec)

mysql> insert into foo VALUES (2), (3);
Query OK, 2 rows affected (0.00 sec)
Records: 2  Duplicates: 0  Warnings: 0

mysql> select * from foo LIMIT 0, -1;
ERROR 1064 (42000): 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 '-1' at line 1

mysql> select VERSION();
+-----------------+
| VERSION()       |
+-----------------+
| 4.1.1-alpha-log |
+-----------------+
1 row in set (0.00 sec)
[16 Dec 2003 9:15] Alexander Keremidarski
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the original bug instead.

Thank you for your interest in MySQL.

Additional info:

This is duplicate of #2037
http://bugs.mysql.com/bug.php?id=2037
[16 Dec 2003 15:59] [ name withheld ]
I am sorry for the duplicate.

I did search with "LIMIT" keyword and version "4.1.1",
but these conditions did not match with bug #2037,
which has version "4.1.1-alpha" :<

I guess the search system should replace hyphens with
spaces before creating the full text index.