Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
Many Item descendants do not really need Item::fixed, because they get fixed at constructor call time.
This includes (list#1):
- Item_basic_constant
- Item_param (it still can change its Item::type() when the exact value is bound, but does not really need Item::fixed)
- Item_ident_for_show
- Item_copy
- Item_type_holder
- Item_sum_field
- Item_proc
Items that need Item::fixed are limited only to (list#2):
- Item_user_var_as_out_param
- Item_sp_variable
- Item_name_const
- Item_result_field
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:
- Simplify simple items (like literals) as much as possible and reduce their size gradually. This will make it easier to create Item_cache and Item_basic_constant (for literals) for new data types.
- Simplify the code for Item_param, which now has to maintain three things in sync: state, item_type, fixed. After this change there will be only state and item_time (and the latter will be gone after
MDEV-14630). - Preparation to
MDEV-14630, to make its patch easier.
Additionally, at once we'll collect all literals under a new class Item_literal:
- Item_num
- Item_string
- Item_hex_constant
- Item_temporal_literal
They now have some duplicate code. Also, a separate pointer type Item_literal* will be useful for the data type API.
Attachments
Issue Links
- blocks
-
MDEV-4912 Data type plugin API version 1
-
- Closed
-
-
MDEV-14630 Replace {STRING|INT|REAL|DECIMAL|DATE}_ITEM to CONST_ITEM
-
- Closed
-
- is blocked by
-
MDEV-16385 ROW SP variable is allowed in unexpected context
-
- Closed
-
Activity
Description |
Many Item descendants do not really need Item::fixed, because they get fixed at constructor call time.
This includes (list#1): - Item_basic_constant - Item_param (it still can change its Item::type(), but does not really need Item::fixed) - Item_ident_for_show - Item_copy - Item_type_holder - Item_sum_field - Item_proc Items that need Item::fixed are limited only to (list#2): - Item_user_var_as_out_param - Item_sp_variable - Item_name_const - Item_result_field 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: - Simplify simple items (like literals) as much as possible and reduce their size gradually. - Simplify the code for Item_param, which now has to maintain three things in sync: state, item_type, fixed. After this change there will be only state and item_time (and the latter will be gone after |
Many Item descendants do not really need Item::fixed, because they get fixed at constructor call time.
This includes (list#1): - Item_basic_constant - Item_param (it still can change its Item::type(), but does not really need Item::fixed) - Item_ident_for_show - Item_copy - Item_type_holder - Item_sum_field - Item_proc Items that need Item::fixed are limited only to (list#2): - Item_user_var_as_out_param - Item_sp_variable - Item_name_const - Item_result_field 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: - Simplify simple items (like literals) as much as possible and reduce their size gradually. This will make it easier to create Item_cache and Item_basic_constant (for literals) for new data types. - Simplify the code for Item_param, which now has to maintain three things in sync: state, item_type, fixed. After this change there will be only state and item_time (and the latter will be gone after |
Description |
Many Item descendants do not really need Item::fixed, because they get fixed at constructor call time.
This includes (list#1): - Item_basic_constant - Item_param (it still can change its Item::type(), but does not really need Item::fixed) - Item_ident_for_show - Item_copy - Item_type_holder - Item_sum_field - Item_proc Items that need Item::fixed are limited only to (list#2): - Item_user_var_as_out_param - Item_sp_variable - Item_name_const - Item_result_field 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: - Simplify simple items (like literals) as much as possible and reduce their size gradually. This will make it easier to create Item_cache and Item_basic_constant (for literals) for new data types. - Simplify the code for Item_param, which now has to maintain three things in sync: state, item_type, fixed. After this change there will be only state and item_time (and the latter will be gone after |
Many Item descendants do not really need Item::fixed, because they get fixed at constructor call time.
This includes (list#1): - Item_basic_constant - Item_param (it still can change its Item::type(), but does not really need Item::fixed) - Item_ident_for_show - Item_copy - Item_type_holder - Item_sum_field - Item_proc Items that need Item::fixed are limited only to (list#2): - Item_user_var_as_out_param - Item_sp_variable - Item_name_const - Item_result_field 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: - Simplify simple items (like literals) as much as possible and reduce their size gradually. This will make it easier to create Item_cache and Item_basic_constant (for literals) for new data types. - Simplify the code for Item_param, which now has to maintain three things in sync: state, item_type, fixed. After this change there will be only state and item_time (and the latter will be gone after - Preparation to |
Description |
Many Item descendants do not really need Item::fixed, because they get fixed at constructor call time.
This includes (list#1): - Item_basic_constant - Item_param (it still can change its Item::type(), but does not really need Item::fixed) - Item_ident_for_show - Item_copy - Item_type_holder - Item_sum_field - Item_proc Items that need Item::fixed are limited only to (list#2): - Item_user_var_as_out_param - Item_sp_variable - Item_name_const - Item_result_field 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: - Simplify simple items (like literals) as much as possible and reduce their size gradually. This will make it easier to create Item_cache and Item_basic_constant (for literals) for new data types. - Simplify the code for Item_param, which now has to maintain three things in sync: state, item_type, fixed. After this change there will be only state and item_time (and the latter will be gone after - Preparation to |
Many Item descendants do not really need Item::fixed, because they get fixed at constructor call time.
This includes (list#1): - Item_basic_constant - Item_param (it still can change its Item::type(), but does not really need Item::fixed) - Item_ident_for_show - Item_copy - Item_type_holder - Item_sum_field - Item_proc Items that need Item::fixed are limited only to (list#2): - Item_user_var_as_out_param - Item_sp_variable - Item_name_const - Item_result_field 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: - Simplify simple items (like literals) as much as possible and reduce their size gradually. This will make it easier to create Item_cache and Item_basic_constant (for literals) for new data types. - Simplify the code for Item_param, which now has to maintain three things in sync: state, item_type, fixed. After this change there will be only state and item_time (and the latter will be gone after - Preparation to Also, at once we'll collect all literals under a new class {{Item_literal}}: - Item_num - Item_string - Item_hex_constant - Item_temporal_literal They now have some duplicate code. Also, a separate pointer type {{Item_literal*}} will be useful for the data type API. |
Description |
Many Item descendants do not really need Item::fixed, because they get fixed at constructor call time.
This includes (list#1): - Item_basic_constant - Item_param (it still can change its Item::type(), but does not really need Item::fixed) - Item_ident_for_show - Item_copy - Item_type_holder - Item_sum_field - Item_proc Items that need Item::fixed are limited only to (list#2): - Item_user_var_as_out_param - Item_sp_variable - Item_name_const - Item_result_field 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: - Simplify simple items (like literals) as much as possible and reduce their size gradually. This will make it easier to create Item_cache and Item_basic_constant (for literals) for new data types. - Simplify the code for Item_param, which now has to maintain three things in sync: state, item_type, fixed. After this change there will be only state and item_time (and the latter will be gone after - Preparation to Also, at once we'll collect all literals under a new class {{Item_literal}}: - Item_num - Item_string - Item_hex_constant - Item_temporal_literal They now have some duplicate code. Also, a separate pointer type {{Item_literal*}} will be useful for the data type API. |
Many Item descendants do not really need Item::fixed, because they get fixed at constructor call time.
This includes (list#1): - Item_basic_constant - Item_param (it still can change its Item::type(), but does not really need Item::fixed) - Item_ident_for_show - Item_copy - Item_type_holder - Item_sum_field - Item_proc Items that need Item::fixed are limited only to (list#2): - Item_user_var_as_out_param - Item_sp_variable - Item_name_const - Item_result_field 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: - Simplify simple items (like literals) as much as possible and reduce their size gradually. This will make it easier to create Item_cache and Item_basic_constant (for literals) for new data types. - Simplify the code for Item_param, which now has to maintain three things in sync: state, item_type, fixed. After this change there will be only state and item_time (and the latter will be gone after - Preparation to Additionally, at once we'll collect all literals under a new class {{Item_literal}}: - Item_num - Item_string - Item_hex_constant - Item_temporal_literal They now have some duplicate code. Also, a separate pointer type {{Item_literal*}} will be useful for the data type API. |
Link |
This issue blocks |
Description |
Many Item descendants do not really need Item::fixed, because they get fixed at constructor call time.
This includes (list#1): - Item_basic_constant - Item_param (it still can change its Item::type(), but does not really need Item::fixed) - Item_ident_for_show - Item_copy - Item_type_holder - Item_sum_field - Item_proc Items that need Item::fixed are limited only to (list#2): - Item_user_var_as_out_param - Item_sp_variable - Item_name_const - Item_result_field 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: - Simplify simple items (like literals) as much as possible and reduce their size gradually. This will make it easier to create Item_cache and Item_basic_constant (for literals) for new data types. - Simplify the code for Item_param, which now has to maintain three things in sync: state, item_type, fixed. After this change there will be only state and item_time (and the latter will be gone after - Preparation to Additionally, at once we'll collect all literals under a new class {{Item_literal}}: - Item_num - Item_string - Item_hex_constant - Item_temporal_literal They now have some duplicate code. Also, a separate pointer type {{Item_literal*}} will be useful for the data type API. |
Many Item descendants do not really need Item::fixed, because they get fixed at constructor call time.
This includes (list#1): - Item_basic_constant - Item_param (it still can change its Item::type() when the exact value is bound, but does not really need Item::fixed) - Item_ident_for_show - Item_copy - Item_type_holder - Item_sum_field - Item_proc Items that need Item::fixed are limited only to (list#2): - Item_user_var_as_out_param - Item_sp_variable - Item_name_const - Item_result_field 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: - Simplify simple items (like literals) as much as possible and reduce their size gradually. This will make it easier to create Item_cache and Item_basic_constant (for literals) for new data types. - Simplify the code for Item_param, which now has to maintain three things in sync: state, item_type, fixed. After this change there will be only state and item_time (and the latter will be gone after - Preparation to Additionally, at once we'll collect all literals under a new class {{Item_literal}}: - Item_num - Item_string - Item_hex_constant - Item_temporal_literal They now have some duplicate code. Also, a separate pointer type {{Item_literal*}} will be useful for the data type API. |
Link |
This issue is blocked by |
issue.field.resolutiondate | 2018-06-06 10:12:27.0 | 2018-06-06 10:12:27.253 |
Fix Version/s | 10.4.0 [ 23115 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 87668 ] | MariaDB v4 [ 133572 ] |