1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-13 21:42:58 +03:00
Files
mariadb/mysql-test/t/cast.test
tnurnberg@mysql.com/white.intern.koehntopp.de 3f0f275030 Bug#31990: MINUTE() and SECOND() return bogus results when used on a DATE
HOUR(), MINUTE(), ... returned spurious results when used on a DATE-cast.
This happened because DATE-cast object did not overload get_time() method
in superclass Item. The default method was inappropriate here and
misinterpreted the data.

Patch adds missing method; get_time() on DATE-casts now returns SQL-NULL
on NULL input, 0 otherwise. This coincides with the way DATE-columns
behave.

Also fixes similar bug in Date-Field now.
2007-12-11 10:12:05 +01:00

8.0 KiB