Skip to content

Fix duplicate TABLE_COLUMN condition in JDBCMetadataQueryDAO.findEndpoint()#13794

Merged
wu-sheng merged 1 commit intoapache:masterfrom
currenjin:fix/duplicate-table-column-condition-in-find-endpoint
Apr 6, 2026
Merged

Fix duplicate TABLE_COLUMN condition in JDBCMetadataQueryDAO.findEndpoint()#13794
wu-sheng merged 1 commit intoapache:masterfrom
currenjin:fix/duplicate-table-column-condition-in-find-endpoint

Conversation

@currenjin
Copy link
Copy Markdown
Contributor

Fix duplicate TABLE_COLUMN condition in JDBCMetadataQueryDAO.findEndpoint()

  • Add a unit test to verify that the fix works.
  • Explain briefly why the bug exists and how to fix it.

findEndpoint() was adding the TABLE_COLUMN = ? WHERE condition twice and binding EndpointTraffic.INDEX_NAME as a parameter twice, due to a copy-paste error.

The generated SQL was:

select * from endpoint_traffic where table_name = ? and service_id = ? and table_name = ? ...

The second table_name = ? condition is redundant. All other methods in JDBCMetadataQueryDAO add the TABLE_COLUMN condition exactly once. The fix removes the duplicate condition and its corresponding parameter binding.

  • If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
  • Update the CHANGES log.

@wu-sheng wu-sheng added this to the 10.5.0 milestone Apr 6, 2026
@wu-sheng wu-sheng added backend OAP backend related. chore Chores about the project, like code cleaning up, typos, upgrading dependencies, etc. labels Apr 6, 2026
@wu-sheng wu-sheng merged commit 86b6d62 into apache:master Apr 6, 2026
212 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend OAP backend related. chore Chores about the project, like code cleaning up, typos, upgrading dependencies, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants