Bug #84103 Refactor Item::field_type() as a static property of the Item class after resolve
Submitted: 8 Dec 2016 7:56 Modified: 26 Jan 2017 15:12
Reporter: Roy Lyseng Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[8 Dec 2016 7:56] Roy Lyseng
Description:
We need a simple way to set the data type of an Item object. The current way
of using a virtual function to retrieve the data type is complicated (it needs
13 different fields in various subclasses to store the type information).
We also need the data type information to not change after resolving.
Implement a data type property as a byte field in class Item. This type field
is retrieved using the non-virtual function data_type(). This function is a
replacement for the current function field_type().

Implement non-virtual inlined setter functions for data type set_data_type() and
set_data_type_xxx(), where "xxx" is the specific data type. These functions set
all properties related to the type.

How to repeat:
N/A

Suggested fix:
See patch and commit comments.
[26 Jan 2017 15:12] Paul DuBois
Posted by developer:
 
Fixed in 8.0.1.

Code cleanup. No changelog entry needed.