shardingsphere
shardingsphere copied to clipboard
View column type null leads to NPE
Bug Report
Which version of ShardingSphere did you use?
5.0.0 OR 5.1.1
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
Expected behavior
load column meta data
Actual behavior
NPE
Reason analyze (If you can)
1.ColumnMetaData dataType type is int,I think should be Integer 2.SchemaMetaDataLoader#loadAllTableNames load view
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
1.create view such as ,so the information_schema.columns data_type can get null
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`1.1.1.1` SQL SECURITY DEFINER VIEW `v_test` (
`type`) AS
SELECT
NULL AS `type`,
FROM
`test` AS `f`
2.start project so you can get the NPE
Example codes for reproduce this issue (such as a github link).
@irwinai Thank you for your feedback. Can you submit a pr to fix this bug?
@irwinai Thank you for your feedback. Can you submit a pr to fix this bug?
I had communicate with zhang liang,this view null problem I had add issue to TIDB
you can close this issue,thanks