kfysck opened a new issue, #19853:
URL: https://github.com/apache/shardingsphere/issues/19853
## Bug Report
databaseName field in capital letters at yaml files will result in Runtime
Exception.
### Which version of ShardingSphere did you use?
5.1.2
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
proxy
### Expected behavior
```
use LAYER2;
show tables;
```
```
mysql> use LAYER2;
Database changed
mysql> show tables;
+----------------------+------------+
| Tables_in_LAYER2 | Table_type |
+----------------------+------------+
| test | BASE TABLE |
| table_hwc | BASE TABLE |
| data_lifecycle_table | BASE TABLE |
+----------------------+------------+
3 rows in set (0.01 sec)
```
### Actual behavior
When I typed _use LAYER2;_, it displayed at SQL client is normally.
However, there were already printed error logs at log files.
```
11:10:24.191 [ShardingSphere-Command-2] DEBUG
org.apache.shardingsphere.proxy.frontend.mysql.command.MySQLCommandExecutorFactory
- Execute packet type: COM_QUERY, value: MySQLComQueryPacket(sql=show tables)
11:10:24.193 [ShardingSphere-Command-2] ERROR
org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask -
Exception occur: java.lang.NullPointerException: null
at
org.apache.shardingsphere.proxy.backend.text.admin.mysql.executor.ShowTablesExecutor.getAllTableNames(ShowTablesExecutor.java:85)
at
org.apache.shardingsphere.proxy.backend.text.admin.mysql.executor.ShowTablesExecutor.getQueryResult(ShowTablesExecutor.java:74)
at
org.apache.shardingsphere.proxy.backend.text.admin.mysql.executor.ShowTablesExecutor.execute(ShowTablesExecutor.java:67)
at
org.apache.shardingsphere.proxy.backend.text.admin.DatabaseAdminQueryBackendHandler.execute(DatabaseAdminQueryBackendHandler.java:58)
at
org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:97)
at
org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:107)
at
org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:77)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
11:10:24.193 [epollEventLoopGroup-3-2] DEBUG
org.apache.shardingsphere.db.protocol.codec.PacketCodec - Write to client
93b41d2c :
+-------------------------------------------------+
| 0 1 2 3 4 5 6 7 8 9 a b c d e f |
+--------+-------------------------------------------------+----------------+
|00000000| 22 00 00 01 ff cd 07 23 43 31 39 39 37 52 75 6e |"......#C1997Run|
|00000010| 74 69 6d 65 20 65 78 63 65 70 74 69 6f 6e 3a 20 |time exception: |
|00000020| 5b 6e 75 6c 6c 5d |[null] |
+--------+-------------------------------------------------+----------------+
```
Next I typed any statements in SQL client, it was not executing correctly
anymore.
Only display:
```
mysql> show tables;
ERROR 1997 (C1997): Runtime exception: [null]
mysql> show databases;
ERROR 1997 (C1997): Runtime exception: [null]
```
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule
configuration, when exception occur etc.
Configure databaseName in captical letters in config-*.yaml, such as:
```
databaseName: LAYER2
```
--
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]