You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "zxxwyt (via GitHub)" <gi...@apache.org> on 2026/10/01 01:40:05 UTC

[PR] bugfix: filter MySQL column metadata by table name [incubator-seata]

zxxwyt opened a new pull request, #8279:
URL: https://github.com/apache/incubator-seata/pull/8279

   - [x] I have read the [CONTRIBUTING.md](https://github.com/apache/incubator-seata/blob/2.x/CONTRIBUTING.md) guidelines.
   - [x] I have registered the PR [changes](https://github.com/apache/incubator-seata/tree/2.x/changes).
   
   ### Ⅰ. Describe what this PR did
   
   JDBC `DatabaseMetaData.getColumns` accepts a table-name pattern and can return columns from similar tables. For example, metadata for `bill_storage` can include columns from `bill_storage_data_0`, causing duplicate-column errors or incorrect cached metadata.
   
   Filter column metadata by its owning table before processing column ordinals or checking for duplicate columns, respecting the database's identifier case sensitivity.
   
   ### Ⅱ. Does this pull request fix one issue?
   
   Fixes #6241.
   
   ### Ⅲ. Why don't you add test cases (unit test/integration test)?
   
   Added four regression tests covering columns from similar tables, identifier case sensitivity, and rejection of duplicate columns in the same table. The tests also verify that unrelated column ordinals are ignored and the original qualified table name is preserved.
   
   ### Ⅳ. Describe how to verify it
   
   - `./mvnw -pl rm-datasource -am -Dtest='*TableMetaCacheTest' -Dsurefire.failIfNoSpecifiedTests=false -Dspotless.skip=true test`: 64 tests passed against the latest upstream `2.x` code.
   - The regression tests reproduce three errors without the production fix.
   - `./mvnw spotless:check` and Checkstyle for both changed Java files passed.
   - `git diff --check` passed; the existing Apache license headers are preserved and no dependencies are changed.
   
   ### Ⅴ. Special notes for reviews
   
   Validation used mocked JDBC metadata. A live MySQL/ShardingSphere integration environment was not exercised.
   


-- 
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@seata.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] bugfix: filter MySQL column metadata by table name [incubator-seata]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #8279:
URL: https://github.com/apache/incubator-seata/pull/8279#issuecomment-5954857915

   ## [Codecov](https://app.codecov.io/gh/apache/incubator-seata/pull/8279?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 73.26%. Comparing base ([`ad825ff`](https://app.codecov.io/gh/apache/incubator-seata/commit/ad825ffbb24e62c5e2d76f86d0076010d5de5681?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`ea807a9`](https://app.codecov.io/gh/apache/incubator-seata/commit/ea807a9dd33b458ccdf91b19d4908204212144df?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##                2.x    #8279      +/-   ##
   ============================================
   + Coverage     73.24%   73.26%   +0.01%     
     Complexity     1146     1146              
   ============================================
     Files          1156     1156              
     Lines         42390    42396       +6     
     Branches       5064     5067       +3     
   ============================================
   + Hits          31050    31062      +12     
   + Misses         8859     8851       -8     
   - Partials       2481     2483       +2     
   ```
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/incubator-seata/pull/8279?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...tasource/sql/struct/cache/MysqlTableMetaCache.java](https://app.codecov.io/gh/apache/incubator-seata/pull/8279?src=pr&el=tree&filepath=rm-datasource%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Frm%2Fdatasource%2Fsql%2Fstruct%2Fcache%2FMysqlTableMetaCache.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cm0tZGF0YXNvdXJjZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VhdGEvcm0vZGF0YXNvdXJjZS9zcWwvc3RydWN0L2NhY2hlL015c3FsVGFibGVNZXRhQ2FjaGUuamF2YQ==) | `88.77% <100.00%> (+2.90%)` | :arrow_up: |
   
   ... and [5 files with indirect coverage changes](https://app.codecov.io/gh/apache/incubator-seata/pull/8279/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   [![Impacted file tree graph](https://app.codecov.io/gh/apache/incubator-seata/pull/8279/graphs/tree.svg?width=650&height=150&src=pr&token=tbmHt2ZfxO&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/incubator-seata/pull/8279?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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@seata.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] bugfix: filter MySQL column metadata by table name [incubator-seata]

Posted by "slievrly (via GitHub)" <gi...@apache.org>.
slievrly merged PR #8279:
URL: https://github.com/apache/incubator-seata/pull/8279


-- 
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@seata.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org