[MDEV-16388] Replace member Item::fixed to virtual method is_fixed() Created: 2018-06-04 Updated: 2018-06-06 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 |
|
Many Item descendants do not really need Item::fixed, because they get fixed at constructor call time. This includes (list#1):
Items that need Item::fixed are limited only to (list#2):
Under terms of this task we'll create a common parent Item_fixed_hybrid, move items from list#2 into it, and introduce a virtual method Item::is_fixed() as a replacement for the member Item::fixed. The top level Item::is_fixed() will return true by default, which will cover list#1. Rationale:
Additionally, at once we'll collect all literals under a new class Item_literal:
They now have some duplicate code. Also, a separate pointer type Item_literal* will be useful for the data type API. |