In many places in Item::get_date() we use current_thd. After adding of
MDEV-16991, access to THD will be needed at every call of get_date(), to check rounding mode from thd->variables.
To avoid heavy use of current_thd, we'll add a THD* parameter to Item::get_date().
Also, at the same time, we'll change "ulonglong fuzzydate" to "date_mode_t fuzzydate".
After this change, the definition of Item::get_date() will look like this:
- will have stricter data type control, so an attempt to pass to Item::get_date() an arbitrary integer value (instead of date_mode_t) won't compile
- will have a enum-based storage, so in gdb we can see easy readable values instead of integers:
We'll also change a number of other dependency functions and methods to get "date_mode_t fuzzydate" instead of "ulonglong fuzzydate".