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/09/09 10:41:09 UTC

[GitHub] [shardingsphere] tuohai666 opened a new issue #7136: Unsupported SQL of `CREATE TRIGGER`

tuohai666 opened a new issue #7136:
URL: https://github.com/apache/shardingsphere/issues/7136


   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more details. 
   If no response anymore and we cannot reproduce it on current information, we will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   
   5.0.0-RC1-SNAPSHOT
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-Proxy
   
   ### Expected behavior
   
   Support SQL:
   
   `CREATE TRIGGER trig1 BEFORE INSERT ON t_order FOR EACH ROW set NEW.c=now();`
   
   ### Actual behavior
   
   ```
   line 1:7 no viable alternative at input 'CREATETRIGGER'
   line 1:7 no viable alternative at input 'CREATETRIGGER'
   [ERROR] 20:30:10.192 [ShardingSphere-Command-2] o.a.s.p.f.c.CommandExecutorTask - Exception occur: 
   org.apache.shardingsphere.sql.parser.exception.SQLParsingException: Unsupported SQL of `CREATE TRIGGER trig1 BEFORE INSERT ON t_order FOR EACH ROW set NEW.c=now()`
   	at org.apache.shardingsphere.rdl.parser.engine.executor.RDLSQLParserExecutor.execute(RDLSQLParserExecutor.java:55)
   	at org.apache.shardingsphere.rdl.parser.engine.engine.RDLSQLParserEngine.parse0(RDLSQLParserEngine.java:70)
   	at org.apache.shardingsphere.rdl.parser.engine.engine.RDLSQLParserEngine.parse(RDLSQLParserEngine.java:52)
   	at org.apache.shardingsphere.rdl.parser.engine.ShardingSphereSQLParserEngine.parse(ShardingSphereSQLParserEngine.java:47)
   	at org.apache.shardingsphere.proxy.backend.text.TextProtocolBackendHandlerFactory.newInstance(TextProtocolBackendHandlerFactory.java:75)
   	at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.<init>(MySQLComQueryPacketExecutor.java:71)
   	at org.apache.shardingsphere.proxy.frontend.mysql.command.MySQLCommandExecutorFactory.newInstance(MySQLCommandExecutorFactory.java:70)
   	at org.apache.shardingsphere.proxy.frontend.mysql.command.MySQLCommandExecuteEngine.getCommandExecutor(MySQLCommandExecuteEngine.java:60)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:94)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:73)
   	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)
   ```
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   
   ### Example codes for reproduce this issue (such as a github link).
   


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



[GitHub] [shardingsphere] kimmking closed issue #7136: Unsupported SQL of `CREATE TRIGGER`

Posted by GitBox <gi...@apache.org>.
kimmking closed issue #7136:
URL: https://github.com/apache/shardingsphere/issues/7136


   


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



[GitHub] [shardingsphere] strongduanmu commented on issue #7136: Unsupported SQL of `CREATE TRIGGER`

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #7136:
URL: https://github.com/apache/shardingsphere/issues/7136#issuecomment-689493491


   > ![image](https://user-images.githubusercontent.com/66629133/92588396-7eed8680-f2cb-11ea-8788-11d9c7bd0806.png)
   > CREATE TRIGGER doesn't work for me ,I use the latest sharding-proxy.
   > @strongduanmu
   
   @lidonghai11 I'm very sorry to tell you that the `create trigger statement` does not support logical tables now 😟, and prompt information will be added later. Can you try to create a trigger with a physical table?
   


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



[GitHub] [shardingsphere] kimmking commented on issue #7136: Unsupported SQL of `CREATE TRIGGER`

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #7136:
URL: https://github.com/apache/shardingsphere/issues/7136#issuecomment-719445428


   As this issue have no more infomation for a long time, we close it now.


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



[GitHub] [shardingsphere] tuohai666 commented on issue #7136: Unsupported SQL of `CREATE TRIGGER`

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #7136:
URL: https://github.com/apache/shardingsphere/issues/7136#issuecomment-685454736


   Of course.


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



[GitHub] [shardingsphere] tuohai666 commented on issue #7136: Unsupported SQL of `CREATE TRIGGER`

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #7136:
URL: https://github.com/apache/shardingsphere/issues/7136#issuecomment-682581818


   The exception caused by parser. @tristaZero , can you have a look?


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



[GitHub] [shardingsphere] tristaZero closed issue #7136: Unsupported SQL of `CREATE TRIGGER`

Posted by GitBox <gi...@apache.org>.
tristaZero closed issue #7136:
URL: https://github.com/apache/shardingsphere/issues/7136


   


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



[GitHub] [shardingsphere] lidonghai11 commented on issue #7136: Unsupported SQL of `CREATE TRIGGER`

Posted by GitBox <gi...@apache.org>.
lidonghai11 commented on issue #7136:
URL: https://github.com/apache/shardingsphere/issues/7136#issuecomment-689478521


   ![image](https://user-images.githubusercontent.com/66629133/92588396-7eed8680-f2cb-11ea-8788-11d9c7bd0806.png)
   CREATE TRIGGER  doesn't work for me ,I use the latest sharding-proxy.
   @strongduanmu 


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



[GitHub] [shardingsphere] strongduanmu commented on issue #7136: Unsupported SQL of `CREATE TRIGGER`

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #7136:
URL: https://github.com/apache/shardingsphere/issues/7136#issuecomment-685454232


   @tuohai666 I have fixed this issue, can you help test it? 😀


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