[MDEV-4667] DATE('string') incompability between mysql and mariadb Created: 2013-06-17 Updated: 2018-10-31 Resolved: 2013-07-03 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.5.31, 5.3.12 |
| Fix Version/s: | 10.0.5, 5.5.32, 5.3.13 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Jonas Reinhardt | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
If you do SELECT date('string'); in MySQL you get NULL and if you do the same in MariaDB you get '0000-00-00'; Tried with MySQL ver 5.1.29, probably with all previous versions. |
| Comments |
| Comment by Elena Stepanova [ 2013-06-25 ] |
|
We had various similar issues, since NULL vs 0000-00-00 inconsistency is all over the place, even inside the same version (e.g. compare DATE('string') and FROM_DAYS('string') in MySQL). However, I haven't found this exact problem, so I'm passing it over to Sergei for a verdict. If it's intentional, maybe we should document it here https://kb.askmonty.org/en/date-function/ , the same way as error handling is documented at https://kb.askmonty.org/en/unix_timestamp/. CAST has the same difference: MySQL: MariaDB: |