[MDEV-646] LP:1014723 - UNIX_TIMESTAMP return value change not documented Created: 2012-06-18  Updated: 2013-06-13  Resolved: 2013-06-13

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.5.32, 5.3.13

Type: Bug Priority: Minor
Reporter: Kolbe Kegel (Inactive) Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug1014723.xml    

 Description   

Hi,

In MariaDB 5.3.5, a change was made to UNIX_TIMESTAMP() so that it returns NULL instead of "0" for a nonsense argument. This is a change in behavior from upstream Oracle MySQL releases.

mysql 5.5.22 (root) [test]> select unix_timestamp('(null)');
+--------------------------+
| unix_timestamp('(null)') |
+--------------------------+
|                        0 |
+--------------------------+
1 row in set, 1 warning (0.00 sec)
 
mysql 5.5.23-MariaDB (root) [test]> select unix_timestamp('(null)');
+--------------------------+
| unix_timestamp('(null)') |
+--------------------------+
|                     NULL |
+--------------------------+
1 row in set, 1 warning (0.00 sec)

See:

http://kb.askmonty.org/en/mariadb-535-changelog/

http://bazaar.launchpad.net/~maria-captains/maria/5.3/revision/3435

a) I believe this change should be reverted, so that MariaDB's behavior matches that of the upstream product.

b) If Monty Program chooses not to revert this change, they must better document this incompatibility at http://kb.askmonty.org/en/unix_timestamp/ and http://kb.askmonty.org/en/mariadb-versus-mysql-compatibility/



 Comments   
Comment by Rasmus Johansson (Inactive) [ 2012-06-18 ]

Launchpad bug id: 1014723

Comment by Sergei Golubchik [ 2013-06-13 ]

already documented

Generated at Thu Feb 08 06:30:18 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.