currenjin opened a new pull request, #13794:
URL: https://github.com/apache/skywalking/pull/13794

   ### Fix duplicate `TABLE_COLUMN` condition in 
`JDBCMetadataQueryDAO.findEndpoint()`
   
   - [x] Add a unit test to verify that the fix works.
   - [x] 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:
   
   ```sql
   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 #<issue number>.
   - [x] Update the [`CHANGES` 
log](https://github.com/apache/skywalking/blob/master/docs/en/changes/changes.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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to