union all 丢失数据

【 Bug 的影响】
union all 结果不对

【可能的问题复现步骤】
事务1:
begin;
select * from t1 where a=2 for update;
事务2:
begin;
select * from t1 where a=2 for update;
事务3:
(select t1.TRX_ID,“WAIT LOCK”,t1.KEY_INFO,t2.INSTANCE,t2.SESSION_ID,t2.STATE,t2.CURRENT_SQL_DIGEST_TEXT from DATA_LOCK_WAITS t1 join CLUSTER_TIDB_TRX t2 on t1.TRX_ID=t2.ID)\G

(select t1.TRX_ID,“WAIT LOCK”,t1.KEY_INFO,t2.INSTANCE,t2.SESSION_ID,t2.STATE,t2.CURRENT_SQL_DIGEST_TEXT from DATA_LOCK_WAITS t1 join CLUSTER_TIDB_TRX t2 on t1.TRX_ID=t2.ID)
union all
(select t1.CURRENT_HOLDING_TRX_ID,“HOLD LOCK”,t1.KEY_INFO,t2.INSTANCE,t2.SESSION_ID,t2.STATE,t2.CURRENT_SQL_DIGEST_TEXT from DATA_LOCK_WAITS t1 join CLUSTER_TIDB_TRX t2 on t1.CURRENT_HOLDING_TRX_ID=t2.ID)\G

【看到的非预期行为】
STATE字段值丢失了:

【期望看到的行为】

【相关组件及具体版本】
5.7.25-TiDB-v5.2.2 TiDB Server (Apache License 2.0) Community Edition, MySQL 5.7 compatible
Cluster

  • TiDB 麻烦提供一下 select tidb_verison()
  • MySQL 麻烦提供一下 select @@version

Release Version: v5.2.2
Edition: Community
Git Commit Hash: da1c21fd45a4ea5900ac16d2f4a248143f378d18
Git Branch: heads/refs/tags/v5.2.2
UTC Build Time: 2021-10-20 06:08:33
GoVersion: go1.16.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false

MySQL 版本应该随意吧,我用的5.7.25