apache / shardingsphere

Distributed SQL transaction & query engine for data sharding, scaling, encryption, and more - on any database.
Apache License 2.0
19.88k stars 6.73k forks source link

ShardingSphereSQLParserEngine.parse got null when parsing PostgreSQL ALTER DATABASE #22506

Open TeslaCN opened 1 year ago

TeslaCN commented 1 year ago

Bug Report

Which version of ShardingSphere did you use?

master - ee7db7d4390824d81a1aac4035d2bddd42954eff

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

ShardingSphere-Proxy PostgreSQL

Expected behavior

No error occurred.

Actual behavior

image

postgres=> ALTER DATABASE "regression" SET lc_messages TO 'C';
ERROR:  Cannot invoke "Object.getClass()" because "sqlStatement" is null

Reason analyze (If you can)

image

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

No rule configured.

ALTER DATABASE "regression" SET lc_messages TO 'C'
strongduanmu commented 1 year ago

Hi @tuichenchuxin, can you help check this issue?

tuichenchuxin commented 1 year ago

sure. I'll check it.