Details
-
Task
-
Status: Open (View Workflow)
-
Trivial
-
Resolution: Unresolved
-
None
Description
Cleanups in code that predates MDEV-25529, which moves part of it into sql/sql_time.h:
- MAX_DAY_NUMBER is defined twice as an untyped #define 3652424L (sql/item_timefunc.cc, sql/sql_time.cc). Make it one typed static constexpr constant in a header.
- Its comment "Daynumber from year 0 to 9999-12-31" reads like a count of days over a range. Suggest /** Day number of 9999-12-31, calc_daynr(9999, 12, 31) */.
- The day-range check in date_add_interval() uses C-style (ulonglong) interval.day casts; use functional casts.
Found during review of MDEV-25529 (https://github.com/MariaDB/server/pull/5294); the code predates that change.
Attachments
Issue Links
- relates to
-
MDEV-25529 Auto-create: Pre-existing historical data is not partitioned as specified by ALTER
-
- In Testing
-