Bug #63778 | Can't use connection variable with LIMIT | ||
---|---|---|---|
Submitted: | 16 Dec 2011 20:18 | Modified: | 16 Dec 2011 20:27 |
Reporter: | Greg Kemnitz | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.5.14-enterprise-commercial-advanced-lo | OS: | Linux |
Assigned to: | CPU Architecture: | Any |
[16 Dec 2011 20:18]
Greg Kemnitz
[16 Dec 2011 20:27]
Valeriy Kravchuk
This is a documented limitation (see http://dev.mysql.com/doc/refman/5.5/en/select.html): "The LIMIT clause can be used to constrain the number of rows returned by the SELECT statement. LIMIT takes one or two numeric arguments, which must both be nonnegative integer constants, with these exceptions: - Within prepared statements, LIMIT parameters can be specified using ? placeholder markers. - Within stored programs, LIMIT parameters can be specified using integer-valued routine parameters or local variables as of MySQL 5.5.6."