Repository navigation
test(sequence): cover quoted sequence identifiers - #28780
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? |
0e4c3af to
d4937a3
Compare
XuPeng-SH
left a comment
There was a problem hiding this comment.
Reviewed current head d4937a3bd0545da47a826fad83e2cda26d80e792. No blocking issues found. The regression exercises the decoded backtick sequence identifier through separate public NEXTVAL/SETVAL statements and verifies the expected 7 → 21 → 23 state transition; the fixture creates and drops an isolated database. Exact-head multi-CN BVT passed. This PR adds test coverage only; the production escaping fix is already in main via #28345.
## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Fixes matrixorigin#28245 ## What this PR does / why we need it: The production escaping fix is already present in `main` through matrixorigin#28345. This PR adds the missing end-to-end distributed BVT regression for the original legal sequence-name case; it intentionally makes no production-code or runtime-performance change. The test creates a sequence whose decoded name contains a backtick in an ordinary database, then exercises the supported public `NEXTVAL` and `SETVAL` forms. Returned values prove the initial allocation, SETVAL update, and subsequent increment. Each stateful call is an independent statement. Database identifiers containing a backtick are rejected by frontend name validation, and the extra database-argument overloads are internal rather than public SQL. Those unreachable input forms are not included. The helper-level unit test already verifies escaping of both database and relation components. ## Validation / test plan - `git diff --cached --check` — PASS. - Staged SQL/result consistency check: 3 stateful queries, 3 result headers, expected values `7, 21, 23` — PASS. - Source review confirms every sequence metadata SELECT/UPDATE uses `sequenceTableName`. - Local distributed BVT was not run: unrelated MatrixOne services are active, and this worktree lacks provenance-validated native CGo artifacts. No local runtime result is claimed. Please run `test/distributed/cases/sequence/issue_28245.sql` on the exact PR head. ## Risk / limitations This is regression coverage only; it does not add or alter the already-merged production fix. Exact-head BVT execution and result comparison remain required before closing the issue. The current change adds no production cost or concurrency/resource behavior.
## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Fixes matrixorigin#28245 ## What this PR does / why we need it: The production escaping fix is already present in `main` through matrixorigin#28345. This PR adds the missing end-to-end distributed BVT regression for the original legal sequence-name case; it intentionally makes no production-code or runtime-performance change. The test creates a sequence whose decoded name contains a backtick in an ordinary database, then exercises the supported public `NEXTVAL` and `SETVAL` forms. Returned values prove the initial allocation, SETVAL update, and subsequent increment. Each stateful call is an independent statement. Database identifiers containing a backtick are rejected by frontend name validation, and the extra database-argument overloads are internal rather than public SQL. Those unreachable input forms are not included. The helper-level unit test already verifies escaping of both database and relation components. ## Validation / test plan - `git diff --cached --check` — PASS. - Staged SQL/result consistency check: 3 stateful queries, 3 result headers, expected values `7, 21, 23` — PASS. - Source review confirms every sequence metadata SELECT/UPDATE uses `sequenceTableName`. - Local distributed BVT was not run: unrelated MatrixOne services are active, and this worktree lacks provenance-validated native CGo artifacts. No local runtime result is claimed. Please run `test/distributed/cases/sequence/issue_28245.sql` on the exact PR head. ## Risk / limitations This is regression coverage only; it does not add or alter the already-merged production fix. Exact-head BVT execution and result comparison remain required before closing the issue. The current change adds no production cost or concurrency/resource behavior.
## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Fixes matrixorigin#28245 ## What this PR does / why we need it: The production escaping fix is already present in `main` through matrixorigin#28345. This PR adds the missing end-to-end distributed BVT regression for the original legal sequence-name case; it intentionally makes no production-code or runtime-performance change. The test creates a sequence whose decoded name contains a backtick in an ordinary database, then exercises the supported public `NEXTVAL` and `SETVAL` forms. Returned values prove the initial allocation, SETVAL update, and subsequent increment. Each stateful call is an independent statement. Database identifiers containing a backtick are rejected by frontend name validation, and the extra database-argument overloads are internal rather than public SQL. Those unreachable input forms are not included. The helper-level unit test already verifies escaping of both database and relation components. ## Validation / test plan - `git diff --cached --check` — PASS. - Staged SQL/result consistency check: 3 stateful queries, 3 result headers, expected values `7, 21, 23` — PASS. - Source review confirms every sequence metadata SELECT/UPDATE uses `sequenceTableName`. - Local distributed BVT was not run: unrelated MatrixOne services are active, and this worktree lacks provenance-validated native CGo artifacts. No local runtime result is claimed. Please run `test/distributed/cases/sequence/issue_28245.sql` on the exact PR head. ## Risk / limitations This is regression coverage only; it does not add or alter the already-merged production fix. Exact-head BVT execution and result comparison remain required before closing the issue. The current change adds no production cost or concurrency/resource behavior.
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #28245
What this PR does / why we need it:
The production escaping fix is already present in
mainthrough #28345. This PR adds the missing end-to-end distributed BVT regression for the original legal sequence-name case; it intentionally makes no production-code or runtime-performance change.The test creates a sequence whose decoded name contains a backtick in an ordinary database, then exercises the supported public
NEXTVALandSETVALforms. Returned values prove the initial allocation, SETVAL update, and subsequent increment. Each stateful call is an independent statement.Database identifiers containing a backtick are rejected by frontend name validation, and the extra database-argument overloads are internal rather than public SQL. Those unreachable input forms are not included. The helper-level unit test already verifies escaping of both database and relation components.
Validation / test plan
git diff --cached --check— PASS.7, 21, 23— PASS.sequenceTableName.test/distributed/cases/sequence/issue_28245.sqlon the exact PR head.Risk / limitations
This is regression coverage only; it does not add or alter the already-merged production fix. Exact-head BVT execution and result comparison remain required before closing the issue. The current change adds no production cost or concurrency/resource behavior.