You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
Expected behavior
Execute SELECT COUNT(*) AS total FROM (SELECT DISTINCT rtu.topicset_id FROM relate_topicset_usergroup rtu JOIN relate_usergroup_user ruu ON ruu.usergroup_id = rtu.usergroup_id WHERE ruu.account_id = 1183367845602394287) u LEFT JOIN topicset_info ti ON u.topicset_id = ti.topicset_id LEFT JOIN relate_label_topicset tl ON ti.topicset_id = tl.topicset_id LEFT JOIN teacher_info ti2 ON ti.account_id = ti2.account_id LEFT JOIN unit_first_info ufi ON ufi.unit_first_id = ti.unit_first_id WHERE (ti.topicset_recycled = 1 OR ti.topicset_recycled = 3 OR topicset_recycled = 0) AND ti.topicset_name LIKE CONCAT('%', '测试', '%') AND ti.topicset_typeid = 4successfully.
Actual behavior
[ERROR] 2024-04-24 22:37:49.860 [ShardingSphere-Command-9] o.a.s.p.f.c.CommandExecutorTask - Exception occur: java.sql.SQLException: Error while preparing statement [SELECT COUNT(*) AS total FROM ^M (SELECT DISTINCT rtu.topicset_id FROM relate_topicset_usergroup rtu ^M JOIN relate_usergroup_user ruu ON ruu.usergroup_id = rtu.usergroup_id ^M WHERE ruu.account_id = 1183367845602394287) u LEFT JOIN topicset_info ti ON u.topicset_id = ti.topicset_id ^M LEFT JOIN relate_label_topicset tl ON ti.topicset_id = tl.topicset_id ^M LEFT JOIN teacher_info ti2 ON ti.account_id = ti2.account_id ^M LEFT JOIN unit_first_info ufi ON ufi.unit_first_id = ti.unit_first_id ^M WHERE (ti.topicset_recycled = 1 OR ti.topicset_recycled = 3 OR topicset_recycled = 0) ^M AND ti.topicset_name LIKE CONCAT('%', '测试', '%') AND ti.topicset_typeid = 4 LIMIT 0, 1000]
Caused by: org.apache.calcite.runtime.CalciteException: Failed to encode '测试' in character set 'ISO-8859-1' at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:506)
Reason analyze (If you can)
It may be that ShardingSphere-Proxy cannot use 'ISO-8859-1' to encode Chinese and needs to change the encoding format.
The text was updated successfully, but these errors were encountered:
Hi @umll, thank you for your feedback. Are you using SQL Federation feature? If so, we recommend using the latest version, which is a little more complete.
Bug Report
Which version of ShardingSphere did you use?
ShardingSphere5.1
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
Expected behavior
Execute
SELECT COUNT(*) AS total FROM (SELECT DISTINCT rtu.topicset_id FROM relate_topicset_usergroup rtu JOIN relate_usergroup_user ruu ON ruu.usergroup_id = rtu.usergroup_id WHERE ruu.account_id = 1183367845602394287) u LEFT JOIN topicset_info ti ON u.topicset_id = ti.topicset_id LEFT JOIN relate_label_topicset tl ON ti.topicset_id = tl.topicset_id LEFT JOIN teacher_info ti2 ON ti.account_id = ti2.account_id LEFT JOIN unit_first_info ufi ON ufi.unit_first_id = ti.unit_first_id WHERE (ti.topicset_recycled = 1 OR ti.topicset_recycled = 3 OR topicset_recycled = 0) AND ti.topicset_name LIKE CONCAT('%', '测试', '%') AND ti.topicset_typeid = 4
successfully.Actual behavior
[ERROR] 2024-04-24 22:37:49.860 [ShardingSphere-Command-9] o.a.s.p.f.c.CommandExecutorTask - Exception occur: java.sql.SQLException: Error while preparing statement [SELECT COUNT(*) AS total FROM ^M (SELECT DISTINCT rtu.topicset_id FROM relate_topicset_usergroup rtu ^M JOIN relate_usergroup_user ruu ON ruu.usergroup_id = rtu.usergroup_id ^M WHERE ruu.account_id = 1183367845602394287) u LEFT JOIN topicset_info ti ON u.topicset_id = ti.topicset_id ^M LEFT JOIN relate_label_topicset tl ON ti.topicset_id = tl.topicset_id ^M LEFT JOIN teacher_info ti2 ON ti.account_id = ti2.account_id ^M LEFT JOIN unit_first_info ufi ON ufi.unit_first_id = ti.unit_first_id ^M WHERE (ti.topicset_recycled = 1 OR ti.topicset_recycled = 3 OR topicset_recycled = 0) ^M AND ti.topicset_name LIKE CONCAT('%', '测试', '%') AND ti.topicset_typeid = 4 LIMIT 0, 1000]
Caused by: org.apache.calcite.runtime.CalciteException: Failed to encode '测试' in character set 'ISO-8859-1' at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:506)
Reason analyze (If you can)
It may be that ShardingSphere-Proxy cannot use 'ISO-8859-1' to encode Chinese and needs to change the encoding format.
The text was updated successfully, but these errors were encountered: