Skip to content

test(sequence): cover quoted sequence identifiers - #28780

Merged
XuPeng-SH merged 3 commits into
mainfrom
codex/issue-28245-quoted-identifiers
Sep 12, 2026
Merged

XuPeng-SH merged 3 commits into
mainfrom
codex/issue-28245-quoted-identifiers

Conversation

@XuPeng-SH

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

Fixes #28245

What this PR does / why we need it:

The production escaping fix is already present in main through #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.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@XuPeng-SH
XuPeng-SH merged commit 6875e42 into main Sep 12, 2026
18 of 21 checks passed
@XuPeng-SH
XuPeng-SH deleted the codex/issue-28245-quoted-identifiers branch September 12, 2026 14:58
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## 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.
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## 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.
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## 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.

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/test-ci size/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: sequence functions cannot access identifiers containing backticks

2 participants