I saw that in some complex query of mine where I expected "date" I saw 
"varchar(29)". The relevant part is that the first argument to "ADDDATE" is the 
"LEAST" of two DATEs.

Unhappilie, all the type changes are clearly documented--the most annoying is 
"LEAST" :

In all other cases, the arguments are compared as binary strings.

Timestamp types, too, are 'other cases'. It would be much better if "LEAST" 
(and "GREATEST") returned values of the type of their arguments, if all types 
were alike, aside from length and "width" (number of digits, of fractional 
digits, in timestamp types the degree below day but of the same origin), 
returning a value of the longest and widest, as the boundary allows.

It is also counterintuitive that "ADDDATE" returns anything but a value of some 
timestamp type.

Yuck.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql

Reply via email to