[MDEV-8466] CAST works differently for DECIMAL/INT vs DOUBLE for empty strings Created: 2015-07-15 Updated: 2015-09-25 Resolved: 2015-09-17 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | OTHER |
| Affects Version/s: | 5.5, 10.0, 10.1 |
| Fix Version/s: | 10.1.8 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
DECIMAL/INT vs DOUBLE work differently on CAST for empty strings:
and
correctly return
DOUBLE works differently:
It accepts the value silently:
This happens because the CAST alone does not produce any warnings for DOUBLE:
and produces a warning for DECIMAL and INT:
During a discussion on maria-developers, Sergei and Bar agreed that a warning should be generated for all numeric data types. |