448700174 commented on issue #12315:
URL:
https://github.com/apache/shardingsphere/issues/12315#issuecomment-917795037
But another SQL can't work even I config as this.
SELECT
cps.id,
cpt.area_id,
cpt.area_name,
cps.start_time,
cps.end_time,
cps.schedule_count,
cps.done_count
FROM care_patrol_task cpt,care_patrol_subtask cps
WHERE cpt.tenant_id = #{tenantId}
and cpt.id = cps.task_id
AND cps.carer_id = #{carerId}
AND cps.status = #{status}
binding-tables:
- care_task,care_task_item,care_task_detail
- care_patrol_task,care_patrol_item
- care_patrol_task,care_patrol_subtask
The actual SQL is like this:
2021-09-13 10:55:39.265 [http-nio-8099-exec-1] INFO ShardingSphere-SQL -
Actual SQL: ds ::: SELECT
cps.id,
cpt.area_id,
cpt.area_name,
cps.start_time,
cps.end_time,
cps.schedule_count,
cps.done_count
FROM care_patrol_task_76 cpt,care_patrol_subtask_76 cps
WHERE cpt.tenant_id = ?
and cpt.id = cps.task_id
AND cps.carer_id = ?
AND cps.status = ? ::: [12, 14, 1]
2021-09-13 10:55:39.265 [http-nio-8099-exec-1] INFO ShardingSphere-SQL -
Actual SQL: ds ::: SELECT
cps.id,
cpt.area_id,
cpt.area_name,
cps.start_time,
cps.end_time,
cps.schedule_count,
cps.done_count
FROM care_patrol_task_77 cpt,care_patrol_subtask_77 cps
WHERE cpt.tenant_id = ?
and cpt.id = cps.task_id
AND cps.carer_id = ?
AND cps.status = ? ::: [12, 14, 1]
2021-09-13 10:55:39.265 [http-nio-8099-exec-1] INFO ShardingSphere-SQL -
Actual SQL: ds ::: SELECT
cps.id,
cpt.area_id,
cpt.area_name,
cps.start_time,
cps.end_time,
cps.schedule_count,
cps.done_count
FROM care_patrol_task_78 cpt,care_patrol_subtask_78 cps
WHERE cpt.tenant_id = ?
and cpt.id = cps.task_id
AND cps.carer_id = ?
AND cps.status = ? ::: [12, 14, 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]