Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
Description
Type_handler::Column_definition_fix_attributes() is an addition for Type_handler::Column_definition_set_attributes(). Let's move all the code from virtual implementations of Column_definition_fix_attributes() to the corresponding virtual implementations of Column_definition_set_attributes().
This change is needed to simplify handling of TYPE directives.
In the upcoming task MDEV-10152 Add support for TYPE .. IS REF CURSOR there is a difference in the following two scenarios:
TYPE rec0_t IS RECORD (a INT, b TIME); |
TYPE cur0_t IS REF CURSOR RETURN rec0_t; |
and
TYPE rec0_t IS RECORD (a INT, b TIME); |
c0 rec0_t;
|
TYPE cur0_t IS REF CURSOR RETURN c0%TYPE; |
- In the first scenario, the cursor's RETURN type is rec0_t, which is stored in sp_type_def_list as an sp_type_def_record instance whose Row_definition_list is populated with Spvar_definition element which have undergone through Column_definition_set_attributes() but have not ungergone through Column_definition_fix_attributes()
- In the second scenario, the cursor's RETURN type is c0%TYPE - it's derived from a variable which have already ungergone both Column_definition_set_attributes() and Column_definition_fix_attributes().
This difference is hard to handle.
Unifying the two methods in a single method will make the code easier to understand and easier to maintain for the purposes like the descibed above.
Attachments
Issue Links
- blocks
-
MDEV-10152 Add support for TYPE .. IS REF CURSOR
-
- In Progress
-