You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/10/10 06:44:03 UTC

[GitHub] [shardingsphere] TeslaCN opened a new issue, #10690: SQL may not be rewrote correctly in PostgreSQL Proxy

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

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   master
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   Proxy
   
   ### Expected behavior
   
   ### Actual behavior
   ```
   bmsql=> select * from bmsql_history limit 1;
    hist_id | h_c_id | h_c_d_id | h_c_w_id | h_d_id | h_w_id |         h_date          | h_amount |       h_data       
   ---------+--------+----------+----------+--------+--------+-------------------------+----------+--------------------
          1 |      1 |        1 |        1 |      1 |      1 | 2021-06-07 11:47:57.167 |    10.00 | uxctdVbJBgA91L1jZS
   (1 row)
   
   bmsql=> select setval('bmsql_hist_id_seq', (select max(hist_id) from bmsql_history));
   ERROR:  relation "bmsql_history" does not exist
   LINE 1: ...al('bmsql_hist_id_seq', (select max(hist_id) from bmsql_hist...
                                                                ^
   ```
   
   Proxy logs:
   ```
   [INFO ] 2021-06-07 12:14:13.415 [Connection-1-ThreadExecutor] ShardingSphere-SQL - Logic SQL: select * from bmsql_history limit 1;
   [INFO ] 2021-06-07 12:14:13.416 [Connection-1-ThreadExecutor] ShardingSphere-SQL - SQLStatement: PostgreSQLSelectStatement(limit=Optional[org.apache.shardingsphere.sql.parser.sql.common.segment.dml.pagination.limit.LimitSegment@47e2227f], lock=Optional.empty, window=Optional.empty)
   [INFO ] 2021-06-07 12:14:13.416 [Connection-1-ThreadExecutor] ShardingSphere-SQL - Actual SQL: ds_0 ::: select * from bmsql_history_0 limit 1;
   [INFO ] 2021-06-07 12:14:15.217 [Connection-1-ThreadExecutor] ShardingSphere-SQL - Logic SQL: select setval('bmsql_hist_id_seq', (select max(hist_id) from bmsql_history));
   [INFO ] 2021-06-07 12:14:15.217 [Connection-1-ThreadExecutor] ShardingSphere-SQL - SQLStatement: PostgreSQLSelectStatement(limit=Optional.empty, lock=Optional.empty, window=Optional.empty)
   [INFO ] 2021-06-07 12:14:15.217 [Connection-1-ThreadExecutor] ShardingSphere-SQL - Actual SQL: ds_0 ::: select setval('bmsql_hist_id_seq', (select max(hist_id) from bmsql_history));
   [ERROR] 2021-06-07 12:14:15.218 [Connection-1-ThreadExecutor] o.a.s.p.f.c.CommandExecutorTask - Exception occur: 
   org.postgresql.util.PSQLException: ERROR: relation "bmsql_history" does not exist
     Position: 62
   	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
   	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
   	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
   	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
   	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
   	at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307)
   	at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293)
   	at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270)
   	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:266)
   	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:1168)
   	at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:106)
   	at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java)
   	at org.apache.shardingsphere.proxy.backend.communication.jdbc.executor.callback.impl.ProxyStatementExecutorCallback.execute(ProxyStatementExecutorCallback.java:40)
   	at org.apache.shardingsphere.proxy.backend.communication.jdbc.executor.callback.ProxyJDBCExecutorCallback.executeSQL(ProxyJDBCExecutorCallback.java:73)
   	at org.apache.shardingsphere.proxy.backend.communication.jdbc.executor.callback.ProxyJDBCExecutorCallback.executeSQL(ProxyJDBCExecutorCallback.java:66)
   	at org.apache.shardingsphere.proxy.backend.communication.jdbc.executor.callback.ProxyJDBCExecutorCallback.executeSQL(ProxyJDBCExecutorCallback.java:44)
   	at org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutorCallback.execute(JDBCExecutorCallback.java:85)
   	at org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutorCallback.execute(JDBCExecutorCallback.java:64)
   	at org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.syncExecute(ExecutorEngine.java:101)
   	at org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.parallelExecute(ExecutorEngine.java:97)
   	at org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.execute(ExecutorEngine.java:82)
   	at org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutor.execute(JDBCExecutor.java:65)
   	at org.apache.shardingsphere.proxy.backend.communication.jdbc.executor.ProxyJDBCExecutor.execute(ProxyJDBCExecutor.java:66)
   	at org.apache.shardingsphere.proxy.backend.communication.ProxySQLExecutor.useDriverToExecute(ProxySQLExecutor.java:166)
   	at org.apache.shardingsphere.proxy.backend.communication.ProxySQLExecutor.execute(ProxySQLExecutor.java:125)
   	at org.apache.shardingsphere.proxy.backend.communication.ProxySQLExecutor.execute(ProxySQLExecutor.java:114)
   	at org.apache.shardingsphere.proxy.backend.communication.ProxyLockEngine.doExecute(ProxyLockEngine.java:103)
   	at org.apache.shardingsphere.proxy.backend.communication.ProxyLockEngine.execute(ProxyLockEngine.java:81)
   	at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.execute(DatabaseCommunicationEngine.java:99)
   	at org.apache.shardingsphere.proxy.backend.text.data.impl.UnicastDatabaseBackendHandler.execute(UnicastDatabaseBackendHandler.java:57)
   	at org.apache.shardingsphere.proxy.frontend.postgresql.command.query.text.PostgreSQLComQueryExecutor.execute(PostgreSQLComQueryExecutor.java:63)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:93)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:71)
   	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)
   ```
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] github-actions[bot] commented on issue #10690: SQL may not be rewrote correctly in PostgreSQL Proxy

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #10690:
URL: https://github.com/apache/shardingsphere/issues/10690#issuecomment-1272350841

   Hello , this issue has not received a reply for several days.
   This issue is supposed to be closed.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] github-actions[bot] closed issue #10690: SQL may not be rewrote correctly in PostgreSQL Proxy

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #10690: SQL may not be rewrote correctly in PostgreSQL Proxy
URL: https://github.com/apache/shardingsphere/issues/10690


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] TeslaCN closed issue #10690: SQL may not be rewrote correctly in PostgreSQL Proxy

Posted by GitBox <gi...@apache.org>.
TeslaCN closed issue #10690: SQL may not be rewrote correctly in PostgreSQL Proxy
URL: https://github.com/apache/shardingsphere/issues/10690


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org