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

   ### Fix missing `and` keyword in `JDBCEBPFProfilingTaskDAO.getTaskRecord()`
   
   - [x] Add a unit test to verify the fix.
   - [x] Update the [`CHANGES` 
log](https://github.com/apache/skywalking/blob/master/docs/en/changes/changes.md).
   
   `JDBCEBPFProfilingTaskDAO.getTaskRecord()` builds a SQL query with two WHERE 
conditions (`table_column` and `logical_id`), but the `and` keyword between 
them was missing.
   
   The generated SQL looked like:
   
   ```sql
   select * from ebpf_profiling_task where table_column = ?logical_id = ?
   ```
   
   This is a SQL syntax error. Every call to `getTaskRecord()` fails at the 
database level.
   
   **Fix**
   
   Added the missing ` and ` between the two conditions:
   
   ```java
   // Before
   " where " + JDBCTableInstaller.TABLE_COLUMN + " = ?" +
       EBPFProfilingTaskRecord.LOGICAL_ID + " = ?";
   
   // After
   " where " + JDBCTableInstaller.TABLE_COLUMN + " = ? and " +
       EBPFProfilingTaskRecord.LOGICAL_ID + " = ?";
   ```
   
   - [ ] If this pull request closes/resolves/fixes an existing issue, replace 
the issue number. Closes #<issue number>.


-- 
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