[MDEV-14630] Replace {STRING|INT|REAL|DECIMAL|DATE}_ITEM to CONST_ITEM Created: 2017-12-12 Updated: 2020-05-05 Resolved: 2018-06-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data types |
| Fix Version/s: | 10.4.0 |
| Type: | Task | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
The enumeration Item::Type has data-type specific constants for literals:
This is not friendly to upcoming data type plugins, as they'll need to create their own literals. We'll do the following:
Note, under terms of this task, we'll preserve the old behavior. For example, Item_param::type() (when assigned to an integer value), reports itself as INT_ITEM. This makes parameter work as a position rather than an expression when used in ORDER BY:
This behavior was most likely introduced as a side effect. The new implementation will preserve the old behavior, including side effects like this. |