thswlsqls opened a new issue, #40197:
URL: https://github.com/apache/shardingsphere/issues/40197

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   master @ 01446d4fad4
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy (DistSQL)
   
   ### Expected behavior
   An out-of-range pool property is reported as a 
`StorageUnitsValidateException` naming the storage unit, e.g. `Storage unit 
name: 'ds_0', error message is: maxPoolSize can not less than 1.`
   
   ### Actual behavior
   The client receives `Unknown exception.` (SQLState HY000, code 0) without 
the storage unit name. When several units are validated together, result 
aggregation stops at the first failure.
   
   ### Reason analyze (If you can)
   `DataSourcePoolPropertiesValidator.validateProperties()` 
(`infra/data-source-pool/core`) catches only `IllegalArgumentException` from 
the content validator. The only implementation, 
`HikariDataSourcePoolPropertiesContentValidator`, uses Guava 
`Preconditions.checkState` since #28037 and throws `IllegalStateException`, so 
the exception is not wrapped into `InvalidDataSourcePoolPropertiesException` 
and `SQLExceptionTransformEngine` turns it into `UnknownSQLException`.
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   ```sql
   REGISTER STORAGE UNIT ds_0 (URL="jdbc:mysql://127.0.0.1:3306/demo_ds_0", 
USER="root", PASSWORD="root", PROPERTIES("maxPoolSize"="0"));
   ```
   `ALTER STORAGE UNIT` with the same property behaves the same way.
   
   ### Example codes for reproduce this issue (such as a github link).
   N/A
   
   


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

Reply via email to