[MDEV-4384] ORDER BY / GROUP BY @var_name produces no error Created: 2013-04-09  Updated: 2013-04-09  Resolved: 2013-04-09

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Trivial
Reporter: Federico Razzoli Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None


 Description   

SELECT * FROM ... LIMIT @x
produces an error, for any @x.

SELECT * FROM ... ORDER BY @x
doesn't produce any error, and ORDER BY seems to do nothing.

SELLECT * FROM ... GROUP BY @x
doesn't produce any error, and it seems that there is a grouping, thought it seems to ignore the value of @x.



 Comments   
Comment by Sergei Golubchik [ 2013-04-09 ]

This is the expected behavior. See http://dev.mysql.com/doc/refman/5.1/en/select.html for the syntax and semantics of LIMIT, ORDER BY, GROUP BY

Comment by Federico Razzoli [ 2013-04-09 ]

I thought that a syntax error was expected, like in the "limit" case... sorry.

Generated at Thu Feb 08 06:56:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.