question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unsupported SQL of `CREATE TRIGGER`

See original GitHub issue

Bug Report

For English only, other languages will not accept.

Before report a bug, make sure you have:

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
strongduanmucommented, Sep 2, 2020

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

0reactions
kimmkingcommented, Oct 30, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

SHOW ON TRIGGER IS UNSUPPORTED - sql - Stack Overflow
I have tried to create 2 tables and still doesn't work. It still shows error ""Show is unsupported. Skipped".". I'm very new on...
Read more >
Db2 11 - Codes - SQLCODE -797 - IBM
The trigger definition includes an unsupported triggered SQL statement. The SQL statements that are allowed as a triggered SQL statement are specified in ......
Read more >
15.00 - Unsupported Trigger Features - Teradata Database
Unsupported Trigger Features Teradata Database does not support triggers created in Teradata ... CREATE FUNCTION (SQL Form)/REPLACE FUNCTION (SQL Form) ...
Read more >
L797: ATTEMPT TO CREATE TRIGGER trigger-name WITH ...
L797: ATTEMPT TO CREATE TRIGGER trigger-name WITH AN UNSUPPORTED SQL STATEMENT. Parent topic: L700 - L799. Comment on this topic ...
Read more >
Procedures and Triggers are not supported in the Azure SQL ...
The below stored procedures are not supported in the Azure SQL Managed Instance. So, what can be the alternate way resolve this error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found