The following methods:
have pieces of code responsible for MYSQL_TIME initialization and verification.
We'll move this code to new constructors for Time() and Datetime().
For example, for Field_time the relevant code looks like this:
After this change, the code will look about like this:
Notice, in the new reduction (instead of MYSQL_TIME initialization), there will be a Datetime() instantiation.
The new code in Field_xxx will look much simpler.
Note, the "bool have_smth_to_conv" will be removed. It's not needed. We'll pass NULL to store_TIME_with_warning() instead of a MYSQL_TIME pointer in all cases when false was passed as a actual parameter for have_smth_to_conv.
This change is needed for
The idea is to have these methods:
- Datetime Datetime::round(uint scale)
- Time Time::round(uint scale)
Therefore, the relevant code should be ready to work in terms of Time and Datetime rather than MYSQL_TIME.