RaigorJiang opened a new issue, #22925:
URL: https://github.com/apache/shardingsphere/issues/22925
### Which version of ShardingSphere did you use?
master 6f625cf7
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
### Expected behavior
Provide accurate message when wrong strategy type is specified in `CREATE
SHARDING TABLE RULE` statement.
### Actual behavior
Sharding strategy type only supports `standard`, `complex`, `hint`, but when
I specify `error`, I cannot get accurate error message.
```sql
mysql> CREATE SHARDING TABLE RULE t_order_item (
-> DATANODES("ds_${0..1}.t_order_item"),
->
DATABASE_STRATEGY(TYPE="ERROR",SHARDING_COLUMN=user_id,SHARDING_ALGORITHM(TYPE(NAME="inline",PROPERTIES("algorithm-expression"="ds_${user_id
% 2}"))))
-> );
ERROR 19150 (44000): Invalid sharding_db algorithms `[inline]`.
mysql>
```
Invalid strategy type `error` should be prompted here, not the algorithm
name.
--
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.
To unsubscribe, e-mail:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]