[MDEV-15702] Remove the use of STRING_ITEM from Item_func_date_format::fix_length_and_dec() Created: 2018-03-28 Updated: 2018-03-28 Resolved: 2018-03-28 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data types |
| Fix Version/s: | 10.3.6 |
| Type: | Task | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
We'll be replacing data type specific constants STRING_ITEM, INT_ITEM, REAL_ITEM, DECIMAL_ITEM, DATE_ITEM to LITERAL_ITEM soon (see Under terms of this task we'll remove usage of STRING_ITEM in Item_func_date_format::fix_length_and_dec() by replacing this condition:
to
The main point in this condition is to catch constants (literals and bound Item_param instances), so calling val_str() can be done directly in fix_length_and_dec() to calculate the result max_length more precisely. As a good side effect, this change will allow constants of non-string types, to calculate max_length more precisely. |