Bug #15526 cannot determine value of "MAXVALUE" used in partitioning
Submitted: 6 Dec 2005 16:21 Modified: 2 Feb 2008 12:36
Reporter: Kolbe Kegel Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Partitions Severity:S4 (Feature request)
Version:5.1.3 OS:Linux (Linux)
Assigned to: Mattias Jonsson CPU Architecture:Any

[6 Dec 2005 16:21] Kolbe Kegel
Description:
MySQL's RANGE partitioning uses a LESS THAN MAXVALUE clause to indicate that a given partition should accept all values above the range specified by the previous partition. Currently, "MAXVALUE" is used as a sort of function (a la CURRENT_DATE) or a special keyword. In either case, it would be useful to be able to query the value of that constant.

It could be implemented in such a way that both of these queries would function properly:

SELECT MAXVALUE;

SELECT MAXVALUE();

If this is ever storage-engine specific, additional syntax would be required to express that. That could take either of these forms:

SELECT MAXVALUE FROM test.t1; -- what happens with a join? could pick the lowest of all possible values... error, perhaps, if the parser would support that

SELECT MAXVALUE(test.t1); -- this is sort of peculiar syntax but possibly more sensible

How to repeat:
n/a

Suggested fix:
Implement as described in Description.
[2 Feb 2008 12:36] Mattias Jonsson
MAXVALUE is not a constant, it is a supremum (please see bug#32566 and Bug#29258)

All possible values are less than MAXVALUE.

http://en.wikipedia.org/wiki/Supremum