Repository navigation
Conversation
XuPeng-SH
left a comment
There was a problem hiding this comment.
Reviewed the full six-file change. No blocking finding in this scoped JSON_KEYS repair.
The IsSimple check is placed after existing document/path parsing and before Query. It rejects wildcard, recursive descent and range paths without changing the shared parser or treating a quoted "*" member name as a wildcard. The tests cover constant/row paths, text/native JSON, masked rows, SQL NULL, missing/non-object controls, error precedence and the typed 3149/42000 error including serialization. The execution change is a bounded path-classification check and introduces no new retained resources.
Approval is scoped to the implementation at this SHA, not a waiver of the documented Draft/merge ordering. Recheck the error-code allocation after #27990 lands and rerun the declared package/error-contract/canonical BVT checks on the integrated head. Existing focused and real-client probe evidence is reused; no fresh native/mo-tester run is claimed. Keep #28041 open through QA.
0745d94 to
4b2270c
Compare
4b2270c to
82cecd0
Compare
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? |
Merge Queue Status
This pull request spent 6 minutes 57 seconds in the queue, with no time running CI. ReasonPull request #28328 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Waiting for any of
All conditions
Tick the box to put this pull request back in the merge queue (same as
|
What type of PR is this?
Which issue(s) this PR fixes:
issue #28041
What this PR does / why we need it:
JSON_KEYS(json_doc, path)rejects typed wildcard, recursive-descent and array-range paths with MySQL error 3149 / SQLSTATE 42000 and the exact message:In this situation, path expressions may not contain the * and ** tokens or an array range.Document validation precedes a NULL path, while a SQL NULL document returns NULL without evaluating its path. Quoted literal
*keys remain valid. Simple-path lookup disables non-array auto-wrapping, so object$[0]and$[last]return NULL while real array indexes continue to work. The shared parser accepts tab/newline/carriage-return range separators and rejects reversed same-origin ranges before JSON_KEYS path classification. JSON_EXTRACT and JSON_LENGTH retain valid-range behavior; JSON_SET, JSON_REMOVE and JSON_CONTAINS retain their range rejection.Dependency and merge order
Retain #27990 -> #28328 merge order. The foreign prerequisite remains OPEN/Draft at
1a9ade8f4d114f7982dd8cd11efd1a2c36e89e92, owned by Lundomn. Its 20338/20339 allocation was compared with current main; this PR now uses unique internal code 20340 and does not import or call unmerged digest implementation. Recheck allocation and any actual integration delta when the dependency lands. Its unmerged status alone is not a missing JSON_KEYS implementation or developer-test gate.Validation
Final candidate:
6cdf281ca4aee8115ea1be5c6790a648f0a427d1; integrated base:c4a210802d8aca10b51d8c9dd184b123a9d7771d. Inspected latest main:a53390c57de48ac280249ff0e88831e502e20fb0; its later changes do not intersect this nine-file change or JSON path/error contracts.make build-with-prebuilt-native: PASS using actual Go 1.27.1 on darwin/arm64, CGo and default SIMD. Binary producer is786d307ac6641b5629c300984f55415ac4da3a85, SHA2567562579e99734a937e89eefd9130ce630b231be4184b8e1b2b932d79fc5a539e. Final commit only removes four blank result-file lines; all production/build inputs are identical. Native provenance and actual loaded library are bound to the execution.test/distributed/cases/function/func_json_keys.test/.result: PASS twice on the same freshly started test-owned instance, each 38/38 statements, zero failed/ignored/abnormal. Normal expected-result comparison was used. The first attempt's 37/38 fixture-format failure remains recorded; its extra expected blank row was removed without changing SQL, headers, NULL values or errors.git diff --check: PASS.666701570c392a6052341b6ddb9c21869bb1d733and paired official regression inputs/results. No live MySQL execution is claimed. Existing generic MO invalid-document/path diagnostics remain unchanged; this PR does not claim complete JSON error-number parity.Earlier disk exhaustion, Go bootstrap/SIMD selector failure and occupied-default-port admission failure were preserved and resolved through environment/configuration changes. No skipped or zero-selection run is counted as a pass. Post-push CI remains a separate gate and will be checked on the published head.
QA required: yes — user-visible SQL/path/error compatibility. Developer automation covers the terminal results listed above; independent formal QA on its own version/environment remains pending. Keep issue #28041 open until explicit QA acceptance. Independent review is complete for this scope; Ready opens maintainer review and does not mean merge approval or formal QA completion.