UNIX_TIMESTAMP return value change not documented
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
New
|
Undecided
|
Sergei Golubchik |
Bug 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(
+------
| unix_timestamp(
+------
| 0 |
+------
1 row in set, 1 warning (0.00 sec)
mysql 5.5.23-MariaDB (root) [test]> select unix_timestamp(
+------
| unix_timestamp(
+------
| NULL |
+------
1 row in set, 1 warning (0.00 sec)
See:
http://
http://
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://
Changed in maria: | |
assignee: | nobody → Sergei (sergii) |
milestone: | none → 5.3 |
I cannot migrate to MariaDB from Oracle MySQL because sql failed on MariaDB slave but succeeded on Oracle Mysql master.
Error 'Column 'sale_time' cannot be null' on query. Default database: 'xmhouse'. Query: 'insert into dmc_sale_time (proj_id,sale_time) values ('1269' ,unix_timestamp ('2013- 10'))'
MariaDB [(none)]> select unix_timestamp( '2013-10' ); ------- ------- ------- + '2013-10' ) | ------- ------- ------- + ------- ------- ------- +
+------
| unix_timestamp(
+------
| NULL |
+------
1 row in set, 1 warning (0.00 sec)