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 2020/03/23 12:56:17 UTC

[GitHub] [incubator-shardingsphere] wangjing112 opened a new issue #4904: proxy4.0.1 PREPARE SQLParsingException

wangjing112 opened a new issue #4904: proxy4.0.1 PREPARE SQLParsingException
URL: https://github.com/apache/incubator-shardingsphere/issues/4904
 
 
   proxy v4.0.1
   
   exec sql:
   PREPARE stmt1 FROM 'SELECT * from table where id=?';
   set @chidaodezhongsheng  = 12;
   EXECUTE stmt1 USING @id;
   
   
   error log:
   
   line 1:0 no viable alternative at input 'PREPARE'
   line 1:0 mismatched input 'PREPARE' expecting {SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE, SET, WITH, DESC, BEGIN, COMMIT, ROLLBACK, SAVEPOINT, CALL, USE, DESCRIBE, SHOW, REPLACE, START, RENAME}
   [ERROR] 20:50:52.733 [ShardingSphere-Command-10] o.a.s.s.f.c.CommandExecutorTask - Exception occur: 
   org.apache.shardingsphere.sql.parser.exception.SQLParsingException: Unsupported SQL of `PREPARE stmt1 FROM 'SELECT * from t_role_friend_wait where roleId=?'`
           at org.apache.shardingsphere.sql.parser.core.parser.SQLParserEngine.parse(SQLParserEngine.java:73)
           at org.apache.shardingsphere.sql.parser.core.SQLParseKernel.parse(SQLParseKernel.java:58)
           at org.apache.shardingsphere.shardingproxy.backend.text.TextProtocolBackendHandlerFactory.newInstance(TextProtocolBackendHandlerFactory.java:72)
           at org.apache.shardingsphere.shardingproxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.<init>(MySQLComQueryPacketExecutor.java:65)
           at org.apache.shardingsphere.shardingproxy.frontend.mysql.command.MySQLCommandExecutorFactory.newInstance(MySQLCommandExecutorFactory.java:72)
           at org.apache.shardingsphere.shardingproxy.frontend.mysql.command.MySQLCommandExecuteEngine.getCommandExecutor(MySQLCommandExecuteEngine.java:60)
           at org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:91)
           at org.apache.shardingsphere.shardingproxy.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)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tuohai666 commented on issue #4904: proxy4.0.1 PREPARE SQLParsingException

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #4904: proxy4.0.1 PREPARE SQLParsingException
URL: https://github.com/apache/incubator-shardingsphere/issues/4904#issuecomment-613214812
 
 
   @wangjing112, I have tried DBeaver, unbelievable good. Thanks.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tuohai666 edited a comment on issue #4904: proxy4.0.1 PREPARE SQLParsingException

Posted by GitBox <gi...@apache.org>.
tuohai666 edited a comment on issue #4904: proxy4.0.1 PREPARE SQLParsingException
URL: https://github.com/apache/incubator-shardingsphere/issues/4904#issuecomment-613209921
 
 
   @wangjing112, thanks. Users can't benefit from this PREPARE usage, all commands still transport via COM_QUERY, the performance won't improve. And I never heard of someone use this SQL.  I suggest we don't fix this issue until someone use like that normally. What do you think?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tuohai666 commented on issue #4904: proxy4.0.1 PREPARE SQLParsingException

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #4904: proxy4.0.1 PREPARE SQLParsingException
URL: https://github.com/apache/incubator-shardingsphere/issues/4904#issuecomment-613209921
 
 
   @wangjing112, thanks. Users can't benefit from this PREPARE usage, all commands still transport via COM_QUERY, the performance won't improve. And I never heard of someone use this SQL.  I suggest we don't fix this issue. What do you think?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] wangjing112 commented on issue #4904: proxy4.0.1 PREPARE SQLParsingException

Posted by GitBox <gi...@apache.org>.
wangjing112 commented on issue #4904: proxy4.0.1 PREPARE SQLParsingException
URL: https://github.com/apache/incubator-shardingsphere/issues/4904#issuecomment-613375823
 
 
   > @wangjing112, thanks. Users can't benefit from this PREPARE usage, all commands still transport via COM_QUERY, the performance won't improve. And I never heard of someone use this SQL. I suggest we don't fix this issue until someone use like that normally. What do you think?
   
   i agree!
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tuohai666 edited a comment on issue #4904: proxy4.0.1 PREPARE SQLParsingException

Posted by GitBox <gi...@apache.org>.
tuohai666 edited a comment on issue #4904: proxy4.0.1 PREPARE SQLParsingException
URL: https://github.com/apache/incubator-shardingsphere/issues/4904#issuecomment-612742356
 
 
   @wangjing112, Thanks for your report. The parser didn't support PREPARE yet. I'll try to fix it, this is the first step.
   
   The next step is complicated. PREPARE and EXECUTE in this case are not real preparedStatement transport in the wire. They are all TEXT protocol. We don't have the mechanism to cache the parameter like @id.
   
   BTW, can you show me the scenarios that you use PREPARE like that?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] wangjing112 closed issue #4904: proxy4.0.1 PREPARE SQLParsingException

Posted by GitBox <gi...@apache.org>.
wangjing112 closed issue #4904: proxy4.0.1 PREPARE SQLParsingException
URL: https://github.com/apache/incubator-shardingsphere/issues/4904
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tuohai666 commented on issue #4904: proxy4.0.1 PREPARE SQLParsingException

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #4904: proxy4.0.1 PREPARE SQLParsingException
URL: https://github.com/apache/incubator-shardingsphere/issues/4904#issuecomment-612742356
 
 
   Thanks for your report. The parser didn't support PREPARE yet. I'll try to fix it, this is the first step.
   
   The next step is complicated. PREPARE and EXECUTE in this case are not real preparedStatement transport in the wire. They are all TEXT protocol. We don't have the mechanism to cache the parameter like @id.
   
   BTW, can you show me the scenarios that you use PREPARE like that?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] wangjing112 commented on issue #4904: proxy4.0.1 PREPARE SQLParsingException

Posted by GitBox <gi...@apache.org>.
wangjing112 commented on issue #4904: proxy4.0.1 PREPARE SQLParsingException
URL: https://github.com/apache/incubator-shardingsphere/issues/4904#issuecomment-612839641
 
 
   > @wangjing112, Thanks for your report. The parser didn't support PREPARE yet. I'll try to fix it, this is the first step.
   > 
   > The next step is complicated. PREPARE and EXECUTE in this case are not real preparedStatement transport in the wire. They are all TEXT protocol. We don't have the mechanism to cache the parameter like @id.
   > 
   > BTW, can you show me the scenarios that you use PREPARE like that?
   
   it to test issuse #4707 by dbeaver.
   in normal will not use PREPARE like this.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services