You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "menghaoranss (via GitHub)" <gi...@apache.org> on 2026/08/20 08:21:16 UTC

[PR] Use database default schema in encrypt insert update tokens [shardingsphere]

menghaoranss opened a new pull request, #39531:
URL: https://github.com/apache/shardingsphere/pull/39531

   Fixes #ISSUSE_ID.
   
   Changes proposed in this pull request:
     -
   
   ---
   
   Before committing this PR, I'm sure that I have checked the following options:
   - [ ] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
   - [ ] I have self-reviewed the commit code.
   - [ ] I have (or in comment I request) added corresponding labels for the pull request.
   - [ ] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
   - [ ] I have made corresponding changes to the documentation.
   - [ ] I have added corresponding unit tests for my changes.
   - [ ] I have updated the Release Notes of the current development version. For more details, see [Update Release Note](https://shardingsphere.apache.org/community/en/involved/contribute/contributor/)
   - [ ] I have disclosed the tool and affected files or scope for any material AI assistance, as required by the [AI-assisted contribution policy].
   
   [AI-assisted contribution policy]: https://github.com/apache/shardingsphere/blob/master/AI_POLICY.md
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Use database default schema in encrypt insert update tokens [shardingsphere]

Posted by "menghaoranss (via GitHub)" <gi...@apache.org>.
menghaoranss merged PR #39531:
URL: https://github.com/apache/shardingsphere/pull/39531


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Use database default schema in encrypt insert update tokens [shardingsphere]

Posted by "menghaoranss (via GitHub)" <gi...@apache.org>.
menghaoranss commented on PR #39531:
URL: https://github.com/apache/shardingsphere/pull/39531#issuecomment-5354879644

   ```markdown
   ### Result
   
   **Review Result: Mergeable**
   
   The insert-update token generator now supplies the database metadata owner’s resolved default schema to encryption algorithms when SQL omits a schema.
   
   ### Evidence
   
   - [`generateSQLTokens`](https://github.com/apache/shardingsphere/blob/92600fa635e1203dd703bac492c735b1f182154f/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/insert/EncryptInsertOnUpdateTokenGenerator.java#L78-L105) preserves an explicit schema and otherwise uses `database.getDefaultSchemaName()`.
   - The resolved schema is passed through literal token generation to the [cipher, assisted-query, and like-query encryptors](https://github.com/apache/shardingsphere/blob/92600fa635e1203dd703bac492c735b1f182154f/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/insert/EncryptInsertOnUpdateTokenGenerator.java#L181-L205).
   - The [focused regression test](https://github.com/apache/shardingsphere/blob/92600fa635e1203dd703bac492c735b1f182154f/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/insert/EncryptInsertOnUpdateTokenGeneratorTest.java#L149-L166) verifies that the resolved schema reaches encryption and produces the expected assignment.
   - Focused verification against the exact PR head passed: `EncryptInsertOnUpdateTokenGeneratorTest` — 5 tests, 0 failures, 0 errors, exit code 0.
   
   ### Coverage
   
   - Reviewed head: `92600fa635e1203dd703bac492c735b1f182154f`.
   - Merge base: `897225986af790052db0b6b594d7da80b7774e5c`.
   - The authoritative GitHub scope and local triple-dot scope matched: 2 files reviewed.
   - Reviewed the default-schema-aware insert-update encryption cluster across explicit/default schema selection, cipher/assisted/like literal encryption, parameter assignments, `VALUES(...)` rewriting, and high-frequency invocation impact.
   - Completed root-cause/behavior, blast-radius/contracts, tests/runtime/operations, and final convergence passes.
   - No unresolved correctness gaps or blocking issues.
   - Code-correctness result only; CI was not reviewed.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org