Skip to content

[fix] correct date-time and encrypt-digest function doc issues#3710

Merged
morningman merged 1 commit into
apache:masterfrom
boluor:fix-batch18-19-simple
May 20, 2026
Merged

[fix] correct date-time and encrypt-digest function doc issues#3710
morningman merged 1 commit into
apache:masterfrom
boluor:fix-batch18-19-simple

Conversation

@boluor
Copy link
Copy Markdown
Contributor

@boluor boluor commented May 20, 2026

Summary

Fixes 19 small documentation issues across the date-time and encrypt-digest function references. Each item below is independent.

date-time-functions

  • quarters-add.md — error messages in two out of range examples named month_add (a copy-paste from months-add.md); corrected to quarters_add.
  • sec-to-time.md — the description gave the seconds bound of TIME as ±3023999; the real max for 838:59:59 is 3020399 (838*3600 + 59*60 + 59). Both occurrences corrected.
  • second-ceil.md / second-floor.md — Return Value paragraph used \<date_or_time_expr>`while the parameters table uses``; unified on ``. The same files also had a leftover Chinese link label [timestamptz的转换]inside the English doc; replaced with[timestamptz conversion]`.
  • sub-time.md / add-time.md — two of the three relative links in the parameter row had an extra ../ and a stray literal docs/ segment (../../../../../docs/sql-manual/...); aligned to the sibling link's correct form ../../../../sql-manual/....
  • time-format.md — a stray closing ``` fence sat at the very end of the file (after the Note) with no matching opener; removed.
  • timestampadd.md — the second -- Unit not supported, invalid example actually triggers an out-of-range error, not an unsupported-unit error; the comment is updated to match the actual error.
  • timestampdiff.md — the Description said "behaves consistently with the [date_diff function] in MySQL"; the matching MySQL function is TIMESTAMPDIFF. Function name and URL anchor corrected.
  • to-days.md / unix-timestamp.md / utc-time.md — misaligned ASCII result-table borders. utc-time.md additionally had a top border missing its leading +.
  • week-floor.md — an error label read RROR 1105 (HY000): (missing the leading E); corrected to ERROR 1105 (HY000):.
  • week.md — the mode-description table was enclosed in a ```sql fence and rendered as raw code; the fence is removed so the markdown table renders normally (consistent with yearweek.md).
  • week.md / weekday.md / weekofyear.md — the parameters table key was \<datetime_or_date>`while the Syntax used`<date_or_time_expr>`; unified on `<date_or_time_expr>``.
  • weekofyear.md — a sentence said "the 1st week of the current year starts from the next Sunday". The function uses Monday-start weeks (mode-3 default), so corrected to "next Monday".
  • year-ceil.md / year-floor.md<period> description said "how many seconds each period consists of" / "Default is 1 second" (copy-paste from the second-ceil docs); corrected to "years" / "1 year".
  • weeks-sub.md — error messages echoed weeks_add instead of weeks_sub; corrected.
  • years-sub.md — error messages echoed year_add instead of years_sub; corrected.
  • weeks-diff.md / years-diff.md — the null_input1 / null_input2 result tables had rulers one character narrower than the data cells; widened.
  • year-ceil.md / year-floor.md — the TimeStampTz result tables had header rows one character shorter than their rulers; padded.

encrypt-digest-functions

  • aes-encrypt.md — the key-padding paragraph said "if the key input by the user is less than 16 bits"; the unit used elsewhere in the same paragraph is bytes (128/8 = 16 bytes). Corrected to "bytes".
  • aes-decrypt.md / aes-encrypt.md — frontmatter description referenced AESDECRYPT, AESENCRYPT, and AES128ECB with no underscores; corrected to AES_DECRYPT, AES_ENCRYPT, and AES_128_ECB.
  • murmur-hash3-32.md — a Note bullet was written as -Note: with no space after the dash and the sentence ended with a full-width ; corrected to - Note: and an ASCII period.

Test plan

  • CI doc build passes
  • Spot-check the affected pages render correctly (error messages, MySQL references, result-table alignment, the week.md mode table no longer rendered as code, link labels)

date-time-functions:
- quarters-add.md: error messages named `month_add` (copy-paste); corrected to `quarters_add`.
- sec-to-time.md: the max-seconds bound was written as `3023999`; the actual max for `838:59:59` is `3020399`.
- second-ceil.md / second-floor.md: Return Value paragraph used `<date_or_time_expr>` while the params table uses `<datetime>`; unified on `<datetime>`. Also a Chinese link label `[timestamptz的转换]` in the English doc; changed to `[timestamptz conversion]`.
- sub-time.md / add-time.md: two of the three relative links in the params row had an extra `../` and a stray literal `docs/` segment; aligned to the sibling link's `../../../../sql-manual/...` form.
- time-format.md: a stray closing ``` fence at end of file (after the Note); removed.
- timestampadd.md: the second `-- Unit not supported, invalid` example actually triggers an out-of-range error; comment updated to match the error.
- timestampdiff.md: Description's MySQL reference pointed at `date_diff`; corrected to `timestampdiff` (function and URL anchor).
- to-days.md / unix-timestamp.md / utc-time.md: misaligned result tables; widened/closed borders. utc-time also had a top border missing its leading `+`.
- week-floor.md: error label `RROR 1105` was missing its leading `E`.
- week.md: the mode-description table was wrapped in a ```sql fence, so it rendered as raw text; fence removed.
- week.md / weekday.md / weekofyear.md: the params table used `<datetime_or_date>` while Syntax used `<date_or_time_expr>`; unified on `<date_or_time_expr>`.
- weekofyear.md: a sentence said the next week starts on "next Sunday", but the function uses Monday-start weeks; changed to "next Monday".
- year-ceil.md / year-floor.md: `<period>` description was "in seconds" / "1 second" (copy-paste from second-ceil); corrected to "years" / "1 year".
- weeks-sub.md: error messages named `weeks_add`; corrected to `weeks_sub`.
- years-sub.md: error messages named `year_add`; corrected to `years_sub`.
- weeks-diff.md / years-diff.md: the `null_input1` / `null_input2` result tables had rulers one character narrower than the cells; widened.
- year-ceil.md / year-floor.md: the TimeStampTz result tables had a header row one character shorter than its ruler; padded.

encrypt-digest-functions:
- aes-encrypt.md: the key-padding paragraph said "less than 16 bits"; the unit elsewhere is bytes; changed to "bytes".
- aes-decrypt.md / aes-encrypt.md: frontmatter `description` referenced `AESDECRYPT`/`AESENCRYPT`/`AES128ECB` with no underscores; corrected to `AES_DECRYPT`/`AES_ENCRYPT`/`AES_128_ECB`.
- murmur-hash3-32.md: a Note bullet `-Note:` was missing the space after the dash, and the sentence ended with a full-width `。`; corrected to `- Note:` and `.`.
@morningman morningman merged commit f72bb03 into apache:master May 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants