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

   sharding-proxy logs
   `
   2024-11-20 16:07:41.689 [ShardingSphere-Command-3] DEBUG 
o.a.s.proxy.frontend.command.CommandExecutorTask - Exception occur: 
   
org.apache.shardingsphere.infra.exception.dialect.exception.syntax.sql.DialectSQLParsingException:
 You have an error in your SQL syntax: SET DateStyle=ISO; SET 
client_min_messages=notice; SELECT set_config('bytea_output','hex',false) FROM 
pg_settings WHERE name = 'bytea_output'; SET client_encoding='utf-8';, null
        at 
org.apache.shardingsphere.infra.parser.ShardingSphereSQLParserEngine.parse(ShardingSphereSQLParserEngine.java:60)
        at 
org.apache.shardingsphere.proxy.backend.handler.ProxySQLComQueryParser.parse(ProxySQLComQueryParser.java:50)
        at 
org.apache.shardingsphere.proxy.frontend.postgresql.command.query.simple.PostgreSQLComQueryExecutor.<init>(PostgreSQLComQueryExecutor.java:73)
        at 
org.apache.shardingsphere.proxy.frontend.postgresql.command.PostgreSQLCommandExecutorFactory.getCommandExecutor(PostgreSQLCommandExecutorFactory.java:112)
        at 
org.apache.shardingsphere.proxy.frontend.postgresql.command.PostgreSQLCommandExecutorFactory.newInstance(PostgreSQLCommandExecutorFactory.java:77)
        at 
org.apache.shardingsphere.proxy.frontend.postgresql.command.PostgreSQLCommandExecuteEngine.getCommandExecutor(PostgreSQLCommandExecuteEngine.java:65)
        at 
org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:120)
        at 
org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:78)
        at com.alibaba.ttl.TtlRunnable.run(TtlRunnable.java:60)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
   `
   
   When I debug source code (SQLParserExecutor:twoPhaseParse), I found that it 
can't not run multi sql in one line.
   When pgadmin connect to sharding-proxy it automatically run below sql. I run 
any one sql in below that's ok. 
   `SET DateStyle=ISO; SET client_min_messages=notice; SELECT 
set_config('bytea_output','hex',false) FROM pg_settings WHERE name = 
'bytea_output'; SET client_encoding='utf-8';`


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