You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug#35889583: Server fails when we execute set of queries Bug#35996409: Failure in Query_expression::is_set_operation() Bug#36404149: Failing the server
Problem is that we attempt to inspect a query expression object that
has been abandoned due to condition elimination. The problem is with
equality operations that are transformed into semi-join conditions,
where we store the left and right parts of the equality in
sj_inner_exprs and sj_outer_exprs.
The fix is to remove the references in the semi-join expression arrays
when removing the corresponding equality condition. A dive within all
join nests of the query block is necessary, due to the fact that we
may have seen multiple transformations that add join nests so far.
Also had to add some code that was developed for the fix
of bug#35710378. This code was not originally needed for 8.0,
but without it there would be several tests using semi-join that would
change plans.
Change-Id: Ida1bc4c1d586733330b8bd63a3f1f51ac094b96f
Copy file name to clipboardExpand all lines: mysql-test/r/group_by_fd_no_prot.result
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2221,7 +2221,7 @@ id select_type table partitions type possible_keys key key_len ref rows filtered
2221
2221
2 DEPENDENT SUBQUERY t3 NULL index NULL b 15 NULL 1 100.00 Using where; Not exists; Using index; Using join buffer (hash join)
2222
2222
Warnings:
2223
2223
Note 1276 Field or reference 'test.t1.b' of SELECT #3 was resolved in SELECT #1
2224
-
Note 1003 /* select#1 */ select (/* select#2 */ select 2 from `test`.`t2` anti join (`test`.`t3`) on((1 = 1)) where true) AS `col` from `test`.`t1` group by `test`.`t1`.`a`
2224
+
Note 1003 /* select#1 */ select (/* select#2 */ select 2 from `test`.`t2` anti join (`test`.`t3`) on(true) where true) AS `col` from `test`.`t1` group by `test`.`t1`.`a`
2225
2225
explain select (select 2 from t2 where exists(select 1 from t3 where t1.b)) as col from t1 group by t1.a;
2226
2226
ERROR 42000: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'test.t1.b' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
2227
2227
explain select (select 2 from t2 where not exists(select 1 from t3 where t1.b)) as col from t1 group by t1.a;
Copy file name to clipboardExpand all lines: mysql-test/r/group_by_fd_ps_prot.result
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1577,7 +1577,7 @@ id select_type table partitions type possible_keys key key_len ref rows filtered
1577
1577
2 DEPENDENT SUBQUERY t3 NULL index NULL b 15 NULL 1 100.00 Using where; Not exists; Using index; Using join buffer (hash join)
1578
1578
Warnings:
1579
1579
Note 1276 Field or reference 'test.t1.b' of SELECT #3 was resolved in SELECT #1
1580
-
Note 1003 /* select#1 */ select (/* select#2 */ select 2 from `test`.`t2` anti join (`test`.`t3`) on((1 = 1)) where true) AS `col` from `test`.`t1` group by `test`.`t1`.`a`
1580
+
Note 1003 /* select#1 */ select (/* select#2 */ select 2 from `test`.`t2` anti join (`test`.`t3`) on(true) where true) AS `col` from `test`.`t1` group by `test`.`t1`.`a`
1581
1581
explain select (select 2 from t2 where exists(select 1 from t3 where t1.b)) as col from t1 group by t1.a;
1582
1582
ERROR 42000: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'test.t1.b' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
1583
1583
explain select (select 2 from t2 where not exists(select 1 from t3 where t1.b)) as col from t1 group by t1.a;
0 commit comments