?

Log in

No account? Create an account
entries friends calendar profile My Website Previous Previous Next Next
Mark Atwood
fallenpegasus
fallenpegasus
Thoughts while reviewing MySQL documention
Why may LIMIT only take a fixed number? Not even a user variable, let alone an expression.

Wouldn't it be useful to set a user session variable that always gets applied as an implicit limit value?

Both of these things could be done in Drizzle.

Tags: ,

4 comments or Leave a comment
Comments
elfs From: elfs Date: July 31st, 2008 07:59 pm (UTC) (Link)
That's why they pay you the big bucks.
From: harrison_fisk Date: July 31st, 2008 08:39 pm (UTC) (Link)
SQL_SELECT_LIMIT automatically limits results for every query on a session.

SET SQL_SELECT_LIMIT = 1;
SELECT * FROM test.tbl;
(Deleted comment)
From: harrison_fisk Date: July 31st, 2008 08:49 pm (UTC) (Link)
Why would one want to use a session based offset/limit? I can see a definite use case for limiting all of the time, but not sure why one would want to always use an offset.
fallenpegasus From: fallenpegasus Date: August 2nd, 2008 12:40 am (UTC) (Link)
Cool, I did not know that.

Sometime I need to sit down and just read all the system variables.
4 comments or Leave a comment