Bug #14018 | SELECT with LIMIT clause generates inconvenient result, not an error | ||
---|---|---|---|
Submitted: | 13 Oct 2005 20:21 | Modified: | 13 Oct 2005 20:58 |
Reporter: | Pio Stremel Neto | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 4.x / 5.x | OS: | Any (All) |
Assigned to: | CPU Architecture: | Any |
[13 Oct 2005 20:21]
Pio Stremel Neto
[13 Oct 2005 20:58]
Hartmut Holzgraefe
> Shows 10 records. This is correct. > SELECT * FROM table LIMIT 10 ok > Show all records. Note that would give an SINTAX ERROR. > SELECT * FROM table LIMIT10 this is the same as SELECT * FROM table AS LIMIT10 so what happens here is that the LIMIT10 string is taken as a table alias name as documented on http://dev.mysql.com/doc/refman/5.0/en/join.html ... table_reference: table_factor | join_table table_factor: tbl_name [[AS] alias] ... > Note that would give an SINTAX ERROR !!! > SELECT * FROM table BLABLABLA same here