Repository navigation
Fix SQL temporal locales and UNIX_TIMESTAMP bounds - #30794
jiangxinmeng1 wants to merge 45 commits into
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
mo-bot review · Commit: Review completed. Read the assessment. |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-xupeng · review
Commit: 1f5ad400901c4f4276d0f0e74a56ad6b09092419
Assessment: request_changes
Reviewed the complete six-file delta and its callers. Locale formatting and session tests pass, but the Japanese abbreviation change breaks dump/load validation of previously persisted defaults.
Model: gpt-6-astra / xhigh
Session: 01a14d34-4e51-79a3-a62d-6c9c16279dc8 · slot 0 · generation 0
- P2
pkg/sql/plan/function/temporal_locale.go:62: Before upgrading, execute SET lc_time_names='ja_JP'; CREATE TABLE legacy_ja(a VARCHAR(64) DEFAULT (DATE_FORMAT('2024-03-01','%b'))). Its persisted default is '3月'. After this change, rebinding the same origin produces ' 3月'.
Impact: AnalyzeTableDumpBindings can no longer verify this valid historical default. DUMP TABLE on affected existing tables and LOAD TABLE of their bound-expression dumps fail. Preserve a legacy binding witness while retaining the corrected current formatting, and add a historical-metadata regression test.
Evidence: A diagnostic using production BuildPlan with the exact merge-base locale file captured serialized metadata and passed validation. Under the current candidate, new-default validation passed, while both AnalyzeTableDumpBindings(old, old) and AnalyzeTableDumpBindings(current, old) failed with 'table dump cannot verify bound default expression a'. Production callers at pkg/frontend/table_dump.go:1295 and :1733 propagate this error. Retained logs: legacy-capture.jsonl and legacy-current.jsonl; receipts: checks/1792645702554459479-3.json (exit 0) and checks/1792645737044158572-3.json (exit 1).
Validation:
-
Artifacts are retained under /home/xupeng/.local/state/mo-bot/jobs/e63550eb1fa79ed2fc644438/attempt-1. validation-summary.json correlates commands, source fingerprints, exit receipts, logs and artifact hashes; evidence-audit.log confirms the audit passed.
-
Isolation preflight and repository-owned native provenance verification passed. Original source and diagnostic candidate remain clean at the assigned HEAD.
-
Focused locale tests and complete pkg/sql/plan/function and pkg/frontend suites passed. Frontend skipped the existing TestRuleCacheDoubleCheckLocking test.
-
A single-CN SQL diagnostic passed direct and prepared execution through repeated locale changes, canonicalization, NULL inputs and invalid-locale rejection.
-
All 190 affected dictionary entries matched the retained MySQL 8.0 locale reference. git diff --check passed.
Limitations:
-
The compatibility reproduction exercises production planning and binding validation using serialized metadata; it does not perform a cross-version server restart or archive transfer.
-
The full distributed BVT was not replayed locally. Supplied CI statuses lacked retained selection logs and were not treated as proof of specific execution.
-
The linked issue's original body was not separately supplied; requirements were assessed from the frozen PR description and available comments.
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 1f5ad400901c4f4276d0f0e74a56ad6b09092419
Assessment: request_changes
Reviewed the complete six-file delta and affected callers. Reusing the temporal registry removes duplicated validation, and the locale tables match MySQL. However, the Japanese abbreviation correction breaks DUMP/LOAD validation of legitimate pre-upgrade defaults.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1
- P2
pkg/sql/plan/function/temporal_locale.go:62: Before upgrading, execute SET lc_time_names='ja_JP'; CREATE TABLE t(a varchar(64) DEFAULT (date_format('2024-03-01','%b'))); then DUMP the existing table or LOAD its earlier archive using this commit.
Impact: The persisted default is "3月", but rebinding now produces " 3月". AnalyzeTableDumpBindings rejects the legitimate historical expression, blocking backup/restore. Add historical Japanese binding support in the existing verifier and a cross-version regression test while preserving exact-expression validation.
Evidence: A merge-base locale-table control generated the default through ordinary BuildPlan and successfully validated it. Replaying its serialized TableDef against candidate production code failed both DUMP and LOAD binding checks with 'invalid input: table dump cannot verify bound default expression a'; a candidate-created default passed. Frontend table_dump.go:1295 and :1733 propagate this error. Retained logs: base-default-control.log and head-default-replay.log; receipts: checks/1792645832939943012-3.json (exit 0) and checks/1792645863265495934-3.json (exit 1).
Validation:
-
Reconciled commands, frozen-head fingerprints, exit receipts and terminal logs in /home/xupeng/.local/state/mo-bot/jobs/fdaa941b08f9a26300c959a3/attempt-1/validation-reconciliation.json. Source remains unchanged.
-
Private /tmp and loopback preflight passed. Both diagnostic Go tests used the supplied test-exec. Native prerequisites were built through repository make cgo, with 194 tracked inputs verified and seven artifact hashes retained.
-
All 190 Japanese/new-locale names and abbreviations matched pinned MySQL 8.0.43 definitions; locale-table-comparison.log and its receipt record success. git diff --check passed.
-
Frozen exact-head evidence reports successful Ubuntu unit tests, arm64 static analysis and multi-CN BVT jobs. No local_validation gates were supplied.
-
Performance tracing found an eight-element allocation/sort during locale validation and expanded bounded DUMP/LOAD locale searches; per-row lookup remains unchanged. No benchmark measurements are claimed.
Limitations:
-
The regression probe exercises production DDL planning and binding validation, not a running SQL server or physical archive transfer. Its baseline substitutes only the merge-base locale table; candidate replay overlays only diagnostic tests.
-
Raw CI logs and the linked issue's standalone body were not supplied. Issue scope was assessed from the frozen PR description.
aptend
left a comment
There was a problem hiding this comment.
Reviewed exact head 1f5ad40, all six changed files, the linked issue and all review discussion. The new/corrected names are accurate: I independently compared all 190 affected dictionary entries with MySQL 8.0.43.
One blocking upgrade regression remains, detailed inline. Using a complete isolated merge-base checkout, ordinary DDL planning under ja_JP generated and successfully validated a persisted default of 3月. I serialized that actual TableDef and replayed it unchanged on this head: new-default validation passes, but both old-catalog DUMP and historical-source LOAD binding checks reject it with table dump cannot verify bound default expression a.
This independently confirms the issue, rather than relying on existing reviews. The experiment exercised production planning and binding validation, not a live cross-version restart or physical archive transfer.
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: b35e21eadc828b8fb18d80c028935bccde41f88b
Assessment: request_changes
The shared locale registry, UNIX_TIMESTAMP boundary tests, and earlier historical Japanese replay cases check out. Two regressions remain. Existing executable defaults can write different values after upgrade, and a valid current-format default can exhaust the DUMP/LOAD verifier’s search budget.
Model: gpt-6.2-sol / xhigh
Session: 01a1f0a0-5126-78f3-9ab8-ef4e87f2f119 · slot 0 · generation 3
-
P2
pkg/sql/plan/function/func_builtin.go:3297: Upgrade a table created on v4.2.8 with BIGINT DEFAULT (UNIX_TIMESTAMP('3001-01-20 00:00:00')), then insert a row that omits the column under UTC.
Impact: The same stored definition writes 0 where it previously wrote 32536857600. Existing rows retain their values, so inserts after upgrade can silently mix values or hit an existing unique key at 0.
Evidence: v4.2.8 persists this call as an executable default. The current INSERT path copies it and retains its overload index through pkg/sql/plan/build_util.go:3124 and :3189. Replaying the same serialized base definition returned 32536857600 with the baseline implementation and 0 at this head. The in-range control returned 32536771198 in both runs. Preserve the semantics of released definitions or migrate them explicitly while keeping the corrected bounds for newly bound calls. -
P2
pkg/sql/plan/table_dump_binding.go:878: Create an en_US VARCHAR default at time_zone='+13:47' using CONCAT around DATE_FORMAT(FROM_UNIXTIME(1709251200), '%b %Y-%m-%d %H:%i') and 290 constant suffix arguments, then verify it from UTC.
Impact: DUMP TABLE and bound-expression LOAD reject a valid default with 'table dump expression binding exceeds limit'. This can happen on the first column, before a successful timezone hint is available.
Evidence: The paired planner probe passed with the pinned-base files. At this head, the %b case exhausted the production visit budget while the otherwise identical %M control passed. Historical candidates precede the current candidate in exhaustive timezone enumeration, even for this current English value. Keep current-format witnesses reachable within the shared budget while retaining complete-expression checks for historical defaults. See baseline-probes.jsonl and candidate-probes.jsonl.
Validation:
-
Isolation preflight, patch and whitespace verification, native input matching, and all 34 discussion keys passed. Source remained clean.
-
Focused function and frontend tests recorded terminal package passes before the combined command timed out. The planner-only retry then passed all selected tests, including the historical Japanese, distinct-default, named-zone, and forged-metadata cases. See receipts 1795421669235065323-2 and 1795421780682360694-2.
-
Both regression probes passed with the pinned-base behavior and reproduced the findings on the candidate. See receipts 1795421609547804623-2 and 1795421673381927337-2. The commands, source fingerprints, and logs are reconciled in review-validation.md.
Limitations:
-
The compatibility probes exercised real planning and expression execution with serialized metadata. Public INSERT and DUMP/LOAD callers were traced in source. No live shutdown upgrade or archive transfer was run locally.
-
Frozen CI reports that Ubuntu unit tests and two multi-CN BVT lanes passed. Raw case-selection logs were unavailable, and upgrade lanes were skipped.
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: de5ef35928240ea5297fd5f27a520d6c52871dbf
Assessment: request_changes
The shared locale registry and separate UNIX_TIMESTAMP overloads are sound. The two regressions reported on the previous head now pass. Two other restore regressions remain. The expanded locale search can exhaust the verifier’s budget for existing German defaults, and the new overload classification can reject version-one archives.
Model: gpt-6.2-sol / xhigh
Session: 01a1f0a0-5126-78f3-9ab8-ef4e87f2f119 · slot 0 · generation 3
-
P2
pkg/sql/plan/table_dump_binding.go:920: Create a de_DE VARCHAR default at time_zone='+13:47' using CONCAT around DATE_FORMAT(FROM_UNIXTIME(1709251200), '%M %Y-%m-%d %H:%i') and 180 constant suffixes. Verify it from en_US in UTC.
Impact: DUMP TABLE and bound-expression LOAD reject a valid default with 'table dump expression binding exceeds limit'. The first default can fail before the verifier has a successful session hint.
Evidence: The pinned-base planner accepts byte-identical metadata for both %M and %b. The candidate rejects both German cases while both English controls pass. The loop exhausts the timezone inventory for en_US, ja_JP, and ar_EG before reaching de_DE. Preserve previously reachable witnesses within the shared budget and retain full-expression comparison. See locale-baseline.jsonl and locale-candidate.jsonl. -
P2
pkg/sql/plan/table_dump_binding.go:1127: Load a version-one archive containing a BIGINT DEFAULT (UNIX_TIMESTAMP('1971-01-01 00:00:00')), or load an older archive back into its upgraded table with the original executable default intact.
Impact: LOAD TABLE rejects the archive even when its schema matches and the destination can execute the original default.
Evidence: v4.2.8 and its November 14 hotfix wrote version-one manifests without a bound-expression payload. Adding the earlier overload as a competing binding makes the classifier report sensitivity from the ID difference alone. LOAD rejects that result at pkg/frontend/table_dump.go:1749. The paired probe confirms the classification changed for both an in-range fresh target and saved metadata. Preserve version-one restore when its source binding can be established safely. See v1-base.jsonl and v1-head.jsonl.
Validation:
-
Isolation preflight, frozen patch and native-input verification, and all 36 discussion keys passed. The final audit is recorded in checks/1795490985189454869-2.json and review-audit.log.
-
Focused function, frontend, planner, and embed tests passed, including saved UNIX_TIMESTAMP execution, historical Japanese replay, the previous English +13:47 case, and the publication fixture. See focused.jsonl and receipt 1795490816708384321-2.
-
Paired probes reproduced the locale budget and version-one classification regressions. See receipts 1795490766969120305-2, 1795490808760736722-2, 1795490923407021967-2, and 1795490923621190306-2.
Limitations:
-
Local archive probes exercised production planning and verification. The public DUMP and LOAD paths and the released version-one writer were traced in source.
-
Frozen CI reports successful Ubuntu unit and coverage checks and two multi-CN BVT lanes. Raw case-selection logs were unavailable, and the upgrade lanes were skipped.
…261123 # Conflicts: # pkg/sql/plan/function/func_builtin.go # pkg/sql/plan/table_dump_binding.go
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 0e333b864778c5ab88a3def78de6fa97cf544c90
Assessment: request_changes
The shared locale registry and preserved UNIX_TIMESTAMP overloads reuse the existing owners appropriately, but two backup compatibility regressions remain. The earlier German and stable-literal examples now pass; the version-one restore concern remains for boundary-valued defaults.
Model: gpt-6.1-terra / max
Session: 01a22868-a00d-7600-810f-a94dbad7189f · slot 3 · generation 9
-
P2
pkg/sql/plan/table_dump_binding.go:1092: Create a Japanese default before the change at time_zone='+13:47' using CONCAT(DATE_FORMAT(FROM_UNIXTIME(1709251200), '%b %Y-%m-%d %H:%i'), ...) with 80 constant 'x' arguments, then dump it from an en_US session in UTC.
Impact: DUMP TABLE rejects the valid persisted default with 'table dump expression binding exceeds limit'. The added locale and common-offset searches consume the shared budget before the historical Japanese non-hour witness is reached. Keep that witness reachable within the bounded search while retaining complete-expression validation.
Evidence: The merge-base planner created and successfully verified the original serialized TableDef; replaying the identical artifact on the assigned head failed. The matching artifact SHA-256 and terminal results are in legacy-artifact-baseline.log and legacy-artifact-candidate.log; receipts checks/1796017883502806049-4.json and checks/1796017907845551408-246.json record exits 0 and 1 respectively. -
P2
pkg/sql/plan/table_dump_binding.go:1609: Load an older version-one archive for a table with BIGINT DEFAULT (UNIX_TIMESTAMP('3001-01-20 00:00:00')) back into its original upgraded table, whose persisted default still uses the released overload.
Impact: The old and new overload IDs are classified as sensitive because their boundary semantics differ, so RecoverTableDumpV1Bindings rejects the archive even though the original target binding is available. Preserve or reconstruct the historical binding for this case without treating the old and new boundary semantics as interchangeable.
Evidence: The baseline classified the default as suitable for a version-one dump and accepted recovery; the assigned head rejected the exact serialized baseline target with 'legacy table dump cannot verify persisted expression bindings'. See v1-artifact-baseline.log and v1-artifact-candidate.log, with receipts checks/1796018057566241272-4.json and checks/1796018080182151412-239.json. The supplied prior review identifies v4.2.8 and its November 14 hotfix as version-one writers.
Validation:
-
Isolation preflight and native prerequisite provenance verification passed.
-
Focused UNIX_TIMESTAMP, temporal locale, and frontend variable tests passed; receipt checks/1796017999830866588-4.json.
-
Focused planner tests covering historical Japanese defaults, shared timezone witnesses, German defaults, saved overload execution, and stable version-one literals passed; receipts checks/1796018128903746947-4.json and checks/1796018204714150869-4.json.
-
Paired baseline and candidate probes reproduced both findings using unchanged serialized baseline metadata. All 38 discussion keys and the claimed receipts were reconciled in discussion-assessment.json and review-evidence-audit.json.
Limitations:
- The compatibility probes exercised production planning and binding recovery, not a live cross-version server or physical archive transfer. Released binaries and the full distributed BVT were not run locally.
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: e5e9bf1dbd9ab2dd4d1b214ac7387b12bdb9d7fd
Assessment: request_changes
The locale registry reuse and preservation of released UNIX_TIMESTAMP overloads are appropriate, and the previously reported Japanese, German month-name and saved-binding examples pass focused checks. A distinct locale-dependent default still causes DUMP to exhaust the verifier’s budget on the proposed head; the same public SQL case succeeds on the merge-base.
Model: gpt-6.1-terra / max
Session: 01a22af4-cf2a-7f70-88e4-931bbf57d739 · slot 2 · generation 14
- P2
pkg/sql/plan/table_dump_binding.go:1085: Create a table with lc_time_names='de_DE' and time_zone='+13:47', using a long default that concatenates LENGTH(DATE_FORMAT(FROM_UNIXTIME(1706745600), '%M')), a formatted timestamp, and 120 constant arguments. Then switch to en_US and UTC and run DUMP TABLE.
Impact: DUMP rejects a valid stored table definition with 'table dump expression binding exceeds limit', preventing export of affected tables.
Evidence: The German month length is 7 and the English length is 8, but tableDumpFoldedStringSimilarity masks both digits before ranking locales. Earlier tied candidates can exhaust the shared one-million-visit budget before the German +13:47 witness is reached. The public SQL probe passes both English and German cases on the merge-base; on this head English passes and German fails. Adjust witness ordering or scheduling so this valid case remains reachable within the bound while retaining complete-expression comparison.
Validation:
-
Preflight and native prerequisite provenance passed; receipts 1796028918082316936-3, 1796028962874021051-3 and 1796028975639380506-3.
-
Focused planner regressions, including retained historical artifacts and prior Japanese, German and v1 cases, passed on the head; planner-focused.log and receipt 1796029201887117040-3.
-
Focused temporal-function, frontend and prepared-statement tests passed, as did single-CN public SQL checks; temporal-focused.log and temporal-sql.log, receipts 1796030269777319498-3 and 1796031131483837210-3.
-
The paired single-CN DUMP probe passed on the merge-base and failed only for German on the head; sql-dump-base-v2.log and sql-dump-head-v2.log, receipts 1796030165372987079-3 and 1796030081625136715-3.
-
A v4.2.8 hotfix source build produced real version-one metadata archives; release-sql-write-v2.log and receipt 1796031859097889764-3. Baseline and head restore attempts are retained in release-sql-load-base-v2.log and release-sql-load-head-v2.log.
Limitations:
-
Both revisions rejected the tested released version-one archives: the baseline reached a schema-hash mismatch, while the head rejected the typed expression earlier. These archives therefore do not establish a new end-to-end restore regression.
-
The full distributed SQL/BVT suites were not run; public SQL probes used a single-CN cluster.
…261123 # Conflicts: # pkg/sql/plan/table_dump_binding.go
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: b1dafd2922bf817610808b51ed4e9d074491aafe
Assessment: request_changes
The previously reported German month-length example now passes, but the broader DUMP/LOAD search-budget regression remains. A valid conditional locale-dependent default can still exhaust the verifier before it reaches its creation locale and timezone. The shared locale registry and preservation of released UNIX_TIMESTAMP overloads otherwise reuse the existing owners appropriately.
Model: gpt-6.1-terra / max
Session: 01a22aff-bb68-7e31-ae71-ee4ab48ad9d0 · slot 0 · generation 45
- P2
pkg/sql/plan/table_dump_binding.go:1146: Create a VARCHAR default under lc_time_names='de_DE' and time_zone='+13:47' that concatenates IF(MINUTE(FROM_UNIXTIME(1706745600))=47, LENGTH(DATE_FORMAT(FROM_UNIXTIME(1706745600),'%M')), 0), the formatted timestamp, and 120 constant arguments. Then switch to en_US and UTC and run DUMP TABLE.
Impact: DUMP rejects the valid stored definition with 'table dump expression binding exceeds limit', preventing export. Bound-expression LOAD uses the same verifier and can also reject such a definition.
Evidence: At each sampled timezone the IF condition is false, so locale scores tie. Exhaustive searches for earlier locales consume the shared budget before the valid German +13:47 witness is reached. The public SQL probe passes for both English and German with the merge-base Go files, but fails only for German on this head; planner-level controls reproduce the same result. See public-dump-base.log, public-dump-head.log, locale-tie-baseline.log and planner-focused.log. Keep previously reachable witnesses within the bounded search while retaining complete-expression verification.
Validation:
-
Private /tmp and loopback preflight passed, and retained native libraries matched all 195 current native inputs; receipts checks/1796098994175783620-3.json and checks/1796098994355163156-34.json.
-
The public single-CN SQL DUMP probe passed on the merge-base overlay and reproduced the German failure on the candidate; receipts checks/1796099636082945958-3.json and checks/1796099534630310043-3.json.
-
Focused planner checks passed for the earlier Japanese, German and saved-overload examples; the combined candidate run exited 1 because the new German counterexample failed. See planner-focused.log and checks/1796099252023078534-3.json.
-
Focused temporal-function and planner selections passed. Their combined command exited 1 because frontend test dependencies were unavailable with the proxy disabled; the frontend selection passed on retry. See other-focused.log, frontend-focused.log and receipts checks/1796099698306032233-3.json and checks/1796099740827994043-3.json.
Limitations:
-
No live cross-version upgrade or physical archive LOAD was run; the LOAD impact was traced through its verifier call.
-
A v4.2.9 release artifact was not present in the supplied checkout, so its persisted definitions were not independently replayed. Full distributed suites were not rerun.
…261123 # Conflicts: # pkg/sql/plan/table_dump_binding.go
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 2824a3fc7f64ec4edcb2ae2b2ff4b7072d7e3e67
Assessment: request_changes
The locale registry and separate historical UNIX_TIMESTAMP overloads reuse the existing owners appropriately. The earlier conditional German default is covered, but the revised DUMP/LOAD search still depends on the date’s rendered spelling: a source-extracted model exhausts the shared budget for an equivalent non-ISO format before reaching the valid witness.
Model: gpt-6.1-terra / max
Session: 01a23ad7-1273-7211-9d10-4a57bddbf580 · slot 0 · generation 55
- P2
pkg/sql/plan/table_dump_binding.go:1319: Create a default under de_DE and time_zone='+13:47' like the conditional default in TestTableDumpConditionalLocaleDefaultFindsMinuteOffset, but render its date with '%m/%d/%Y %H:%i' and append 180 short literal arguments. Verify it from an en_US UTC session.
Impact: The numeric-date hint does not recognize that format, and the locale-ranking samples all take the conditional’s false branch. The fallback can exhaust the table-wide binding budget before reaching the German timezone witness, causing DUMP and bound-expression LOAD to reject a valid definition.
Evidence: The hint recognizes only YYYY-MM-DD at lines 1125–1155, while the fallback enumerates each preceding locale’s timezones at lines 1350–1392. A source-extracted search model with a simulated binder and 198 visits per binding found the witness on the merge-base at 900108 visits; the candidate reached 1000098 visits before German. The ISO-format control found it at 7128 visits. The model did not execute the production SQL binder. Verify the SQL case through the planner or public DUMP path, and make witness scheduling independent of this formatting while retaining bounded work and complete-expression comparison.
Validation:
-
Private /tmp and loopback preflight passed; receipt checks/1796290085822715371-3.json.
-
The source-extracted baseline, candidate, and ISO-control models completed with exit 0; logs are probe/base-198.log, probe/head-198.log, and probe/head-iso.log, with receipts checks/1796290293805786990-4.json, checks/1796290306486392475-3.json, and checks/1796290527669741829-5.json. The candidate model printed the budget error; it was not a production test.
-
The supplied exact-head CI snapshot reports successful Ubuntu UT and multi-CN BVT jobs. The complete discussion is classified in discussion-assessment.json.
Limitations:
-
Production Go tests and live SQL were not run locally: the host has Go 1.26.6, the checkout requires 1.27.1, and bounded automatic toolchain acquisition timed out.
-
Raw CI test-selection logs were not supplied.
-
The repository identifies the v4.2.9 server source as 6c05e42; newer applicable hotfixes and a full released-binary upgrade were not verified.
What type of PR is this?
Which issue(s) this PR fixes:
Addresses #28597
Fixes #28143
What this PR does / why we need it:
lc_time_namesrejected the reported zh_CN, ru_RU, tr_TR, and ar_EG locales, and Japanese%bhad a spacing mismatch. Add the four locales to the shared temporal locale table, derive accepted variable values from that table, and align Japanese abbreviated months with MySQL. The planner changes keep historical locale and timezone bindings intact when reconstructing table DDL.UNIX_TIMESTAMP(argument)accepted fractional values below its minimum valid second and values beyond its maximum valid second. Apply the same microsecond range check to TIMESTAMP, DATETIME, and string overloads, preserving existing NULL and zero-date behavior. Add unit coverage at both boundaries and SQL regression cases, includingFROM_UNIXTIMEroundtrip.Review follow-up: historical DUMP/LOAD locale verification ranks complete rebindings before exhaustive timezone search, including the historical Japanese
%bera. This keeps valid de_DE and pre-change ja_JP defaults at uncommon offsets within the shared proof budget; full-expression equality remains the acceptance check. For version-one archives with no bound payload, stable literals remain compatible across UNIX_TIMESTAMP string overloads. A boundary-valued literal can also be restored into its original table when the target catalog still carries the exact released overload binding. A newly bound target with changed boundary semantics and DATETIME-era ambiguity remain sensitive.Merged upstream
mainat38c68d02ca. The merge preserves main's ENUM/SET label-era binding and assigns the historicalUNIX_TIMESTAMPbounds a distinct era bit; the flag-independence test covers both. The German month-length DUMP regression, historical UNIX_TIMESTAMP and ENUM/SET recovery regressions, fullpkg/sql/plantests (121.1 s),go vet, andgit diff --checkpassed on that head.Review follow-up on the conditional German default: the new test reproduced the candidate-budget failure before the fix. Numeric date/time text now supplies bounded fixed-offset search hints before exhaustive locale searches; only an exact full-expression rebound is accepted. The new test, existing German/Japanese budget regressions, full
pkg/sql/plansuite (114.5 s), scopedgo vet, andgit diff --checkpassed after mergingmainat89cb66148d. CI for the new head is pending.After merging current upstream
mainat3a1d7780c7, theUNIX_TIMESTAMPbounds flag and main’s releasedRANDOM_BYTESflag use distinct bits. The merged verifier retains both v1 recovery exceptions: released UNIX_TIMESTAMP bindings and declaration/catalog annotation differences. The fullpkg/sql/plansuite passed on head2824a3fc7f(111.194 s), including regressions for the conditional German default, Japanese month names, UNIX_TIMESTAMP v1 restoration, RANDOM_BYTES, and DDL column scope;git diff --checkpassed. CI is running.