[MDEV-16928] Move MYSQL_TIME initialization from Field_xxx::store_time_dec() to new constructors Time() and Datetime() Created: 2018-08-09 Updated: 2018-08-15 Resolved: 2018-08-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data types, Temporal 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 |
|
The following methods:
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. 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:
Therefore, the relevant code should be ready to work in terms of Time and Datetime rather than MYSQL_TIME. |