[MDEV-14675] Questionable semantics of INTERVAL values in PARTITION BY system_time: converted into seconds Created: 2017-12-16 Updated: 2018-02-22 Resolved: 2018-02-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Partitioning, Versioned Tables |
| Affects Version/s: | 10.3.4 |
| Fix Version/s: | 10.3.5 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Elena Stepanova | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
INTERVAL values other than SECOND in PARTITION BY system_time are converted into seconds. It's fine as long as intervals are such that the number of seconds is deterministic (MINUTE, HOUR, DAY, WEEK), but it becomes strange with MONTH and YEAR.
That is, 1 MONTH equals 30 days. Usually the context for INTERVAL allows to keep its natural meaning, e.g. in DATE_ADD interval MONTH actually means a month, not 30 days:
I think the different semantics in the system time partitioning clause can come unexpected for users, but I don't have a good suggestion for how it should work instead, and I couldn't find anything about it in the standard. I'm okay with it being just a documentation issue. |
| Comments |
| Comment by Sergei Golubchik [ 2017-12-16 ] |
|
known bug |
| Comment by Aleksey Midenkov [ 2017-12-19 ] |
|
May be postponed after beta. |
| Comment by Eugene Kosov (Inactive) [ 2018-02-19 ] |