Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shardingsphere-proxy:MySQL batch submit select SQL #34336

Open
hanchenxi0618 opened this issue Jan 13, 2025 · 5 comments
Open

shardingsphere-proxy:MySQL batch submit select SQL #34336

hanchenxi0618 opened this issue Jan 13, 2025 · 5 comments

Comments

@hanchenxi0618
Copy link

Firstly, I used a proxy to proxy a MySQL database. When I connected to the proxy using dBVAER and selected multiple select statements to execute, the SQL received by the proxy was actually a concatenation of multiple SQL statements. After execution, only the result set of the first SQL statement was returned.
image
Background abnormal location :ProxyStatementExecutorCallback.execute

@hanchenxi0618
Copy link
Author

微信图片_20250113161430
微信图片_20250113161601

@terrymanu
Copy link
Member

Can you use text to instead of picture for exception info?

@hanchenxi0618
Copy link
Author

[ERROR] 2025-01-13 17:09:08.148 [ShardingSphere-Command-0] o.a.s.p.f.c.CommandExecutorTask - Exception occur:
java.sql.SQLException: Streaming result set com.mysql.cj.protocol.a.result.ResultsetRowsStreaming@58f1d2b2 is still active. No statements may be issued when any streaming result sets are open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries.
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:130)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:770)
at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:787)
at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:102)
at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java)
at org.apache.shardingsphere.proxy.backend.connector.jdbc.executor.callback.impl.ProxyStatementExecutorCallback.execute(ProxyStatementExecutorCallback.java:44)
at org.apache.shardingsphere.proxy.backend.connector.jdbc.executor.callback.ProxyJDBCExecutorCallback.executeSQL(ProxyJDBCExecutorCallback.java:69)
at org.apache.shardingsphere.proxy.backend.connector.jdbc.executor.callback.ProxyJDBCExecutorCallback.executeSQL(ProxyJDBCExecutorCallback.java:46)
at org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutorCallback.execute(JDBCExecutorCallback.java:91)
at org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutorCallback.execute(JDBCExecutorCallback.java:65)
at org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.syncExecute(ExecutorEngine.java:99)
at org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.parallelExecute(ExecutorEngine.java:95)
at org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.execute(ExecutorEngine.java:78)
at org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutor.execute(JDBCExecutor.java:66)
at org.apache.shardingsphere.proxy.backend.connector.jdbc.executor.ProxyJDBCExecutor.execute(ProxyJDBCExecutor.java:73)
at org.apache.shardingsphere.proxy.backend.connector.ProxySQLExecutor.useDriverToExecute(ProxySQLExecutor.java:237)
at org.apache.shardingsphere.proxy.backend.connector.ProxySQLExecutor.execute(ProxySQLExecutor.java:194)
at org.apache.shardingsphere.proxy.backend.connector.StandardDatabaseConnector.doExecute(StandardDatabaseConnector.java:234)
at org.apache.shardingsphere.proxy.backend.connector.StandardDatabaseConnector.execute(StandardDatabaseConnector.java:190)
at org.apache.shardingsphere.proxy.backend.handler.data.impl.UnicastDatabaseBackendHandler.execute(UnicastDatabaseBackendHandler.java:63)
at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:93)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.doExecuteCommand(CommandExecutorTask.java:126)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:121)
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:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:842)

@terrymanu
Copy link
Member

What is your version?

@hanchenxi0618
Copy link
Author

What is your version?
mysql version : 5.7.31
dbevaer version : 21.1.2
proxy version : 5.5.2

When did it happen?
Batch submit select sql when using dbevaer to connect to the proxy agent of MySQL database

@taojintianxia taojintianxia added this to the 5.5.3 milestone Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants