1. Summary
1.1, the situation
A cluster version TiDB 2.1.2 , upgrade to 3.0.1 , error-free upgrade
Question: After the upgrade, business reaction: reporting platform part of the task execution failed
1.2 Problems and Solutions
Cause of the problem : 2.1.2 upgrade to version 3.0.1 after release, more than two left join SQL execution error: ERROR 1105 (HY000): Column xxx . Xxx IS ambiguous
Test: multiple inner join no effect
Treatment: upgrade to 3.0.2 to solve
Note: I hope 3.0.1 version of TiDB junior partner, if biased complex left join the scene, a timely upgrade to version 3.0.2
Thanks to timely support TiDB official junior partner, points praise ~
2, recurring problem
2.1, specific reproduction
CREATE TABLE `lcl_test` (
`id` int(11) DEFAULT NULL,
`name2` varchar(10) DEFAULT NULL
) ENGINE=InnoDB ;
insert into lcl_test values (1,'a');
insert into lcl_test values (2,'b');
insert into lcl_test values (3,'c')
【查询SQL】 :
select t.id from
(select id from lcl_test ) t
left join
(select id from lcl_test ) t1
on t.id = t1.id
left join
(select id from lcl_test ) t2
on t.id = t2.id
left join
(select id from lcl_test ) t3
on t.id = t3.id
left join
(select id from lcl_test ) t4
on t.id = t4.id ;
【2.1.0.rc2版本,执行正常】
【mysql5.6版本,执行正常】
【3.0.1版本,多于2个left join执行报错】
【3.0.1 版本 ,left join 个数测试,测试2个left join 可以执行,多余2个,报错】
【3.0.1 版本,多个inner join测试,正常执行】
3、处理
郑州不孕不育医院:http://jbk.39.net/yiyuanzaixian/zztjyy/
3.1、具体处理
升级至 3.0.2 版本 完成
3.2、测试
【3.0.2 版本测试,可以正常执行】