select ref_8.v112 as c0, current_user() as c1, (select v1 from test.table2) as c2, ref_16.v123 as c3, case when ((EXISTS ( select (select v41 from test.table2) as c0, ref_26.v85 as c1, ref_16.v18 as c2, (select v58 from test.table2) as c3, ref_16.v85 as c4, subq_0.c1 as c5, ref_9.v27 as c6, ref_8.v48 as c7, 54 as c8 from test.table2 as ref_25 left join test.table2 as ref_26 on (ref_26.v36 is NULL) where ref_17.v136 is NULL)) or ((1) or (ref_16.v84 is not NULL))) or ((ref_17.v75 is not NULL) or ((((1) or ((EXISTS ( select ref_17.v73 as c0, ref_17.v64 as c1, ref_16.v9 as c2, subq_0.c0 as c3, ref_8.v80 as c4 from test.table2 as ref_27 where 1)) or (((1) or ((EXISTS ( select ref_10.v13 as c0, subq_0.c1 as c1, (select v127 from test.table2) as c2, ref_10.v101 as c3, ref_10.v88 as c4 from test.table2 as ref_28 where (0) and (1))) and ((0) and (((0) and (1)) and (1))))) and (0)))) or ((subq_0.c1 is NULL) and (((1) or (1)) or (EXISTS ( select (select v27 from test.table2) as c0, ref_18.v106 as c1, ref_9.v133 as c2 from test.table2 as ref_29 where (1) and ((1) and (1))))))) and ((ref_16.v20 is not NULL) and (1)))) then (select v126 from test.table2) else (select v126 from test.table2) end as c4, ROW_COUNT() as c5 from (select ref_1.v119 as c0, ref_1.v13 as c1 from test.table2 as ref_0 right join test.table2 as ref_1 on ((EXISTS ( select ref_0.v88 as c0, ref_1.v51 as c1, (select v57 from test.table2) as c2, (select v0 from test.table2) as c3 from test.table2 as ref_2 where (ref_2.v59 is NULL) and (((1) and ((1) and ((1) and (0)))) or (EXISTS ( select ref_2.v36 as c0, ref_2.v43 as c1, ref_3.v88 as c2 from test.table2 as ref_3 where 40 is not NULL))))) and (EXISTS ( select ref_1.v65 as c0, ref_4.v29 as c1, ref_1.v34 as c2 from test.table2 as ref_4 where EXISTS ( select ref_1.v105 as c0 from test.table2 as ref_5 where EXISTS ( select ref_0.v80 as c0, ref_4.v67 as c1, ref_5.v44 as c2 from test.table2 as ref_6 where EXISTS ( select ref_0.v67 as c0, ref_1.v38 as c1, ref_0.v117 as c2, ref_5.v8 as c3 from test.table2 as ref_7 where (0) or (ref_6.v66 is not NULL))))))) where ref_1.v56 is not NULL) as subq_0 left join test.table2 as ref_8 inner join test.table2 as ref_9 right join test.table2 as ref_10 on ((((EXISTS ( select ref_10.v107 as c0, ref_10.v113 as c1, ref_9.v82 as c2, 6 as c3, ref_9.v81 as c4, ref_9.v74 as c5, ref_9.v79 as c6, ref_9.v6 as c7, 40 as c8, ref_11.v133 as c9 from test.table2 as ref_11 where ((EXISTS ( select ref_11.v119 as c0, ref_11.v67 as c1, ref_12.v34 as c2, (select v34 from test.table2) as c3, (select v64 from test.table2) as c4, ref_10.v52 as c5, ref_9.v52 as c6, ref_11.v118 as c7, ref_12.v35 as c8, ref_12.v101 as c9, ref_10.v52 as c10 from test.table2 as ref_12 where ((ref_10.v59 is not NULL) and (EXISTS ( select ref_9.v61 as c0, ref_11.v120 as c1, ref_10.v41 as c2, ref_10.v60 as c3, ref_10.v136 as c4, ref_11.v83 as c5, ref_10.v52 as c6, ref_9.v28 as c7 from test.table2 as ref_13 where (((1) or (1)) and ((ref_13.v33 is NULL) and (ref_12.v125 is not NULL))) and (((EXISTS ( select ref_11.v36 as c0, ref_12.v99 as c1 from test.table2 as ref_14 where 0)) and ((ref_12.v3 is not NULL) or (0))) and (0))))) and ((0) and (ref_9.v35 is NULL)))) and (1)) and (ref_11.v130 is NULL))) or (ref_9.v123 is not NULL)) and (0)) and ((1) or (1))) inner join test.table2 as ref_15 inner join test.table2 as ref_16 on (1) left join test.table2 as ref_17 on ((1) and ((1) or (1))) inner join test.table2 as ref_18 right join test.table2 as ref_19 on ((1) and (ref_18.v122 is not NULL)) on ((select v104 from test.table2) is not NULL) on ((ref_19.v53 is NULL) or ((ref_16.v65 is NULL) or ((0) and (91 is not NULL)))) on (((EXISTS ( select ref_9.v96 as c0, ref_19.v136 as c1, (select v16 from test.table2) as c2, ref_19.v60 as c3 from test.table2 as ref_20 where (1) or ((0) or (0)))) and (1)) or ((0) or (ref_9.v18 is NULL))) on (((((EXISTS ( select subq_0.c0 as c0, ref_17.v43 as c1, ref_10.v49 as c2, ref_18.v85 as c3, (select v15 from test.table2) as c4 from test.table2 as ref_21 where 0)) and ((0) and (1))) or (0)) or (((1) and (((((subq_0.c1 is not NULL) or (1)) and ((((0) and (EXISTS ( select 13 as c0, ref_10.v109 as c1, ref_17.v53 as c2, ref_22.v49 as c3, ref_10.v129 as c4, subq_0.c1 as c5, ref_16.v102 as c6, ref_17.v31 as c7, (select v50 from test.table2) as c8, ref_9.v132 as c9 from test.table2 as ref_22 where (0) and (1)))) and (((0) or (5 is not NULL)) and ((0) or (subq_0.c0 is NULL)))) and (EXISTS ( select ref_15.v48 as c0, ref_9.v46 as c1, ref_8.v76 as c2, (select v89 from test.table2) as c3, ref_19.v74 as c4, ref_8.v111 as c5, ref_19.v94 as c6, ref_9.v78 as c7, ref_16.v44 as c8, subq_0.c1 as c9 from test.table2 as ref_23 where ((ref_23.v121 is NULL) and (ref_10.v133 is not NULL)) and (((((0) or ((1) or (0))) and (1)) and (ref_19.v48 is not NULL)) and (((ref_17.v108 is not NULL) and (1)) or (1))))))) and (EXISTS ( select ref_16.v80 as c0, ref_18.v28 as c1 from test.table2 as ref_24 where ref_15.v119 is not NULL))) and (ref_18.v122 is NULL))) or (1))) and (0)) where (WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS( ref_15.v31, ref_9.v50, ref_18.v121) is NULL) and (EXISTS ( select CURRENT_DATE() as c0, ref_15.v107 as c1, subq_0.c0 as c2, ascii( (select v0 from test.table2) ) as c3, case when (0) or (EXISTS ( select ref_19.v33 as c0, ref_15.v97 as c1, ref_15.v118 as c2, ref_18.v82 as c3, ref_9.v11 as c4, ref_18.v40 as c5, ref_17.v64 as c6, ref_9.v112 as c7 from test.table2 as ref_31 where (1) and (ref_8.v99 is NULL))) then 92 else 92 end as c4, ref_10.v94 as c5, ref_18.v49 as c6, ref_17.v18 as c7, ref_17.v48 as c8, ref_8.v98 as c9, ref_10.v85 as c10, ref_17.v118 as c11, ref_10.v59 as c12 from test.table2 as ref_30 where 1));