Aias00 opened a new issue, #7738:
URL: https://github.com/apache/shenyu/issues/7738

   ### Current behavior
   
   The shared `operation_record_log.selectByCondition` statement constructs 
both keyword and exclusion predicates with `concat('%', boundValue, '%')`. 
There is no Oracle-specific statement for this query, so the three-argument 
expression is also sent to Oracle.
   
   ### Location / reachable flow
   
   - 
[operation-record-log-sqlmap.xml:69–87](https://github.com/apache/shenyu/blob/66d7d954ca37d651a5ad916f988a8081157a7ab4/shenyu-admin/src/main/resources/mappers/operation-record-log-sqlmap.xml#L69)
   - `OperationRecordLogController` implements the paged 
`/operation-record/log/list/search` API and supplies the operation-log page 
service.
   - `OperationRecordLogServiceImpl.searchByCondition()` delegates directly to 
this mapper after preprocessing the keyword/exclusion fields and time range.
   
   ### Vendor evidence / validation boundary
   
   Oracle 19c's official SQL language reference specifies [`CONCAT(char1, 
char2)`](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/img_text/concat.html),
 and its [CONCAT 
reference](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/CONCAT.html)
 describes combining exactly those operands. The current three-argument call is 
outside that function syntax. These official pages were retrieved and checked 
during this review.
   
   **Source/vendor-reference confirmed; no actual Oracle instance was run.** 
The expected Oracle failure is invalid argument count when a nonempty 
keyword/exclusion includes the predicate; this report does not present 
fabricated database logs. Searches without those optional filters do not 
construct the expression.
   
   ### Impact / suggested fix
   
   Filtered operation-log search fails on Oracle instead of returning results. 
Bind the wildcard string outside the SQL expression (as other mappers already 
do), use nested two-argument CONCAT, or supply an Oracle `||` expression. 
Preserve the existing include/exclude and CLOB matching semantics.
   
   ### Related existing work
   
   #6675 concerns query bounds/indexing and wildcard performance, rather than 
invalid Oracle syntax. #3489 is the original Oracle operation-log support task; 
#6694 concerns boolean/LIMIT existence checks. The current reachable 
keyword/exclusion expressions are a distinct compatibility failure.
   
   
   ### Reviewed revision
   
   Apache ShenYu 2.7.2-SNAPSHOT, 
`master@66d7d954ca37d651a5ad916f988a8081157a7ab4`. Priority P2 / Medium. 
Unit-test and CI issue categories excluded.
   


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