ChenGengPeng opened a new issue, #24843:
URL: https://github.com/apache/shardingsphere/issues/24843

   Recently, we need to use shardingsphere-proxy to desensitize the data of the 
old application of the company. The framework is SSH (struct2) built in 2011, 
which reports errors in some statements. The error information of 
shardingsphere's log is:
   [ERROR] 2023-03-26 23:21:14.197 [ShardingSphere-Command-22] 
o.a.s.p.f.c.CommandExecutorTask - Exception occur: 
   java.lang.StringIndexOutOfBoundsException: String index out of range: -19
        at java.lang.String.substring(String.java:1967)
        at 
org.apache.shardingsphere.infra.rewrite.sql.impl.AbstractSQLBuilder.getConjunctionText(AbstractSQLBuilder.java:64)
        at 
org.apache.shardingsphere.infra.rewrite.sql.impl.AbstractSQLBuilder.toSQL(AbstractSQLBuilder.java:47)
        at 
org.apache.shardingsphere.infra.rewrite.engine.RouteSQLRewriteEngine.addSQLRewriteUnits(RouteSQLRewriteEngine.java:85)
        at 
org.apache.shardingsphere.infra.rewrite.engine.RouteSQLRewriteEngine.rewrite(RouteSQLRewriteEngine.java:61)
        at 
org.apache.shardingsphere.infra.rewrite.SQLRewriteEntry.rewrite(SQLRewriteEntry.java:75)
        at 
org.apache.shardingsphere.infra.context.kernel.KernelProcessor.rewrite(KernelProcessor.java:59)
        at 
org.apache.shardingsphere.infra.context.kernel.KernelProcessor.generateExecutionContext(KernelProcessor.java:47)
        at 
org.apache.shardingsphere.proxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:123)
        at 
org.apache.shardingsphere.proxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:73)
        at 
org.apache.shardingsphere.proxy.backend.text.data.impl.SchemaAssignedDatabaseBackendHandler.execute(SchemaAssignedDatabaseBackendHandler.java:56)
        at 
org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:97)
        at 
org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:100)
        at 
org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:72)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)  ,The query statement is:
        select   count(*) as  totalCount from (select distinct trealname0_.SEQ 
as col_0_0_, trealname0_.ORID as col_1_0_, trealname0_.ISCENICID as col_2_0_, 
esbscenica1_.SZSCENICNAME as col_3_0_, trealname0_.ITICKETTYPEID as col_4_0_, 
edmtickett2_.SZTICKETTYPENAME as col_5_0_, trealname0_.ICROWDKINDID as 
col_6_0_, edpcrowdki3_.SZCROWDKINDNAME as col_7_0_, trealname0_.CNAME as 
col_8_0_, trealname0_.ZJTP as col_9_0_, trealname0_.IDCARD as col_10_0_, 
trealname0_.ISCHILD as col_11_0_, trealname0_.MBNUMBER as col_12_0_, 
torder4_.DDZT as col_13_0_, trealname0_.TICKETSTATUS as col_14_0_, 
trealname0_.TICKETCONSUMEORID as col_15_0_, trealname0_.TICKETNO as col_16_0_, 
edmcrowdki5_.MACTUALSALEPRICE as col_17_0_ from T_REALNAME trealname0_, 
ESBSCENICAREATAB esbscenica1_, EDMTICKETTYPETAB edmtickett2_, EDPCROWDKINDTAB 
edpcrowdki3_, T_ORDER torder4_, EDMCROWDKINDPRICETAB edmcrowdki5_ where 
trealname0_.PRICEID=edmcrowdki5_.ICROWDKINDPRICEID and 
trealname0_.ORID=torder4_.ORID and trealname0_.ISCENICID=e
 sbscenica1_.ISCENICID and trealname0_.ITICKETTYPEID=edmtickett2_.ITICKETTYPEID 
and trealname0_.ICROWDKINDID=edpcrowdki3_.ICROWDKINDID and 
torder4_.ORID='xxxx')  a


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