You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "gzwz (via GitHub)" <gi...@apache.org> on 2023/04/09 09:11:44 UTC
[GitHub] [shardingsphere] gzwz commented on issue #25063: ShardingSphereResultSetUtil.createColumnLabelAndIndexMap There are more mapped fields than the actual SQL query results, resulting in reading out of bounds
gzwz commented on issue #25063:
URL: https://github.com/apache/shardingsphere/issues/25063#issuecomment-1501082615
org.apache.shardingsphere:shardingsphere-jdbc-core:5.3.2
this is mys sql
---------------------------------------------------------------------------
SELECT
DISTINCT RES.*
FROM
( SELECT
PROCDEF.* ,
INSTANCE.INSTANCE_COUNT_ ,
INC.INCIDENT_TYPE_ ,
INC.INCIDENT_COUNT_
FROM
ACT_RE_PROCDEF PROCDEF
LEFT OUTER JOIN
( SELECT
E.PROC_DEF_ID_ ,
COUNT(E.PROC_INST_ID_) AS INSTANCE_COUNT_
FROM
ACT_RU_EXECUTION E
WHERE
E.PARENT_ID_ IS NULL
GROUP BY
E.PROC_DEF_ID_ ) INSTANCE
ON
PROCDEF.ID_ = INSTANCE.PROC_DEF_ID_
LEFT OUTER JOIN
( SELECT
I.PROC_DEF_ID_ ,
I.INCIDENT_TYPE_ ,
COUNT(I.ID_) AS INCIDENT_COUNT_
FROM
ACT_RU_INCIDENT I
WHERE
I.ID_ = I.ROOT_CAUSE_INCIDENT_ID_
GROUP BY
I.PROC_DEF_ID_,
I.INCIDENT_TYPE_ ) INC
ON
PROCDEF.ID_ = INC.PROC_DEF_ID_ ) RES
ORDER BY
RES.ID_ ASC
------------------------------------------------------------------------
the query result of the query is 18 columns
![图片](https://user-images.githubusercontent.com/15667193/230763802-289b3dc9-ab9d-48bd-a320-3cc925c37fce.png)
and
![图片](https://user-images.githubusercontent.com/15667193/230764102-380d9853-d6bf-46f6-9c88-bd782f035730.png)
The original results found in the above figure are still correct, but at this point, errors begin to occur
![图片](https://user-images.githubusercontent.com/15667193/230764493-85e329f9-d245-4fde-b48a-21801dc1858e.png)
After taking column 19 here, it will cause the boundary to be crossed later on
![图片](https://user-images.githubusercontent.com/15667193/230764587-a0cec7eb-d7fb-47ef-b9a3-e2b14ac4fd88.png)
--
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