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 TEMPORARY TABLE`

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 TEMPORARY TABLE SalesSummary (
     product_name VARCHAR(50) NOT NULL
     , total_sales DECIMAL(12,2) NOT NULL DEFAULT 0.00
     , avg_unit_price DECIMAL(7,2) NOT NULL DEFAULT 0.00
     , total_units_sold INT UNSIGNED NOT NULL DEFAULT 0
);

Actual behavior

[ERROR] 20:19:39.112 [ShardingSphere-Command-0] o.a.s.p.f.c.CommandExecutorTask - Exception occur: 
org.apache.shardingsphere.sql.parser.exception.SQLParsingException: Unsupported SQL of `CREATE TEMPORARY TABLE SalesSummary (
     product_name VARCHAR(50) NOT NULL
     , total_sales DECIMAL(12,2) NOT NULL DEFAULT 0.00
     , avg_unit_price DECIMAL(7,2) NOT NULL DEFAULT 0.00
     , total_units_sold INT UNSIGNED NOT NULL DEFAULT 0
)`
	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:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
strongduanmucommented, Aug 28, 2020

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

@tuohai666 @tristaZero I will check it. Now, I am checking the create table statement in MySQL DDL syntax and related to issue #6498.

0reactions
strongduanmucommented, Sep 9, 2020

@lidonghai11 @tuohai666 Hello, you need to configure the table SalesSummary into the sharding config, otherwise sharding-sphere does not know how to create the table ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ORA-14451: unsupported feature with temporary table
Use in PL/SQL procedure or packages: It is temporary session objects so if we want to use them in PL/SQL code then we...
Read more >
"ORA-14451: unsupported feature with temporary table" Error ...
Above misleading error will pop-up if you create a Private Temporary Table (PTT) while connecting as SYS, SYSDBA, SYSRAC or SYSBACKUP. Solution:.
Read more >
unsupported feature with temporary table - Ed Chen Logic
It turns out that we can't enable logging attribute on a temporary table and failed with ORA-14451. In fact, we cannot specify the...
Read more >
Tag: ORA-14451: unsupported feature with temporary table
Oracle introduced a new feature in 18c release called “Private Temporary Tables”, This feature will essentially enable you to create a ...
Read more >
B.3.6.2 TEMPORARY Table Problems
TEMPORARY tables are supported only by the InnoDB , MEMORY , MyISAM , and MERGE storage engines. Temporary tables are not supported for...
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