You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/11/23 03:51:31 UTC
[GitHub] [shardingsphere] ruanyg opened a new issue, #22350: SS-Proxy report npe when deal with null resultset
ruanyg opened a new issue, #22350:
URL: https://github.com/apache/shardingsphere/issues/22350
### Which version of ShardingSphere did you use?
5.0.0
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
### Expected behavior
SS-Proxy can deal with null resultset correctly.
### Actual behavior
There comes up 4 npe of null ResultSet.I re-executed the sql that reported the error afterwards, then I realized the sqls result are "Empty set".
<img width="1278" alt="image" src="https://user-images.githubusercontent.com/19629642/203465491-4cde3a0e-cc46-4b6e-9846-b9e3beb4f6cf.png">
### Reason analyze (If you can)
* HikariStatement doesn't comply with the jdbc specification.
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
```sql
select
id, activity_seq, activity_name, activity_desc, app_id, store_id, `status`, start_time,
end_time, target_user_type, target_user_type_value, acquire_per_user_limit, apply_type,
`valid`, create_by, update_by, create_time, update_time, banner_pic_url, desc_url,
keywords, activity_type, overlay_config, one_shop_id, channel, activity_clause, seo,
banner_pic_url_mobile, prerequisite_shipping_price_range, entitled_country_target_selection,
entitled_country_ids, user_limited_type, config_ext, style_type, style_text, source_key,
max_benefit_amount, bundled_type, order_use_limit, benefit_type, `overlay`, sort_benefit_value,
sort_benefit_type, sort_event_value, sort_event_type
from promotion_activity
where app_id = 'xxx'
and store_id = 'xxx'
and channel = 0
and activity_type = 1
and (start_time <= DATE_ADD(NOW(), INTERVAL 1 DAY) or start_time is null)
and (end_time >= now() or end_time is null)
and status = 1
and valid = 1
```
--
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN closed issue #22350: SS-Proxy report npe when deal with null resultset
Posted by GitBox <gi...@apache.org>.
TeslaCN closed issue #22350: SS-Proxy report npe when deal with null resultset
URL: https://github.com/apache/shardingsphere/issues/22350
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN commented on issue #22350: SS-Proxy report npe when deal with null resultset
Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #22350:
URL: https://github.com/apache/shardingsphere/issues/22350#issuecomment-1324545193
There were many bugs fixed after 5.0.0. I'm not sure whether this issue is related to https://github.com/apache/shardingsphere/issues/18753.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN commented on issue #22350: SS-Proxy report npe when deal with null resultset
Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #22350:
URL: https://github.com/apache/shardingsphere/issues/22350#issuecomment-1365686709
This issue could not be reproduced in latest version. It may be a bug in version < 5.2.0.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] sandynz commented on issue #22350: SS-Proxy report npe when deal with null resultset
Posted by GitBox <gi...@apache.org>.
sandynz commented on issue #22350:
URL: https://github.com/apache/shardingsphere/issues/22350#issuecomment-1342435379
Hi @ruanyg , I checked `ShardingSpherePreparedStatement.getResultSet()` and `ShardingSphereStatement.getResultSet()`, it might return `null`, but it should work when statement is SELECT.
Could you debug to find why `statement.getResultSet()` return null?
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org