while testing , found additional bugs in current str_to_TIME()
Major :
- "0000-00-00" after parsing becomes year 1970, should be 0
- "0069-12-31" parses as year 1969, should be 69 (YYYY format)
the above 2 make it impossible to parse anything from years 1 AD - 70 AD (and the fake MySQLish year 0)
- "69-12-31" parses as year 1969, should be 2069
Minor /debatable , differences with server
- fails to parse "10:15:01." as TIME (note the trailing dot)
- parses "10000-01-01", which server dismisses as incorrect date ( year > 9999)
- parses time >= 839:00:00 and time <= -839:00:00, which server does not do
- parses incorrect datetime "1999-12-31 834:59:59.999999" is parses as datetime, with hour = 834
- server allows trailing spaces after values, but nothing else, str_to_TIME() allows anything ,except trailing dot e.g "2000-01-01a"
- does not parse some formats that server can, e.g "YYYYMMDD"
Server testing is done with SELECT TIME 'string' , SELECT DATE 'string', SELECT TIMESTAMP 'string' e.g
select DATETIME '1999-12-31 834:59:59.999999';
|
while testing , found additional bugs in current str_to_TIME()
Major :
the above 2 make it impossible to parse anything from years 1 AD - 70 AD (and the fake MySQLish year 0)
Minor /debatable , differences with server
Server testing is done with SELECT TIME 'string' , SELECT DATE 'string', SELECT TIMESTAMP 'string' e.g