Skip to content

Commit d7ea1aa

Browse files
author
Chaithra Gopalareddy
committed
Merge branch 'mysql-8.0' into mysql-8.4
2 parents cc26427 + ea96e77 commit d7ea1aa

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

mysql-test/r/olap.result

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2394,3 +2394,10 @@ CREATE TABLE t1(f1 INTEGER);
23942394
SELECT SUM(TAN(0)) OVER() FROM t1 GROUP BY TAN(0) WITH ROLLUP;
23952395
SUM(TAN(0)) OVER()
23962396
DROP TABLE t1;
2397+
#
2398+
# Bug#36804785: `false' in operator at sql/sql_executor.cc
2399+
#
2400+
CREATE TABLE t1(f1 INTEGER);
2401+
SELECT SUM(UTC_DATE()) OVER() FROM t1 GROUP BY UTC_DATE() WITH ROLLUP;
2402+
SUM(UTC_DATE()) OVER()
2403+
DROP TABLE t1;

mysql-test/t/olap.test

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,3 +1338,11 @@ DROP TABLE t1;
13381338
CREATE TABLE t1(f1 INTEGER);
13391339
SELECT SUM(TAN(0)) OVER() FROM t1 GROUP BY TAN(0) WITH ROLLUP;
13401340
DROP TABLE t1;
1341+
1342+
--echo #
1343+
--echo # Bug#36804785: `false' in operator at sql/sql_executor.cc
1344+
--echo #
1345+
1346+
CREATE TABLE t1(f1 INTEGER);
1347+
SELECT SUM(UTC_DATE()) OVER() FROM t1 GROUP BY UTC_DATE() WITH ROLLUP;
1348+
DROP TABLE t1;

sql/sql_executor.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4322,7 +4322,7 @@ static bool replace_embedded_rollup_references_with_tmp_fields(
43224322
// A const item that is part of group by and not found in
43234323
// select list will not be found in "fields" (It's not added
43244324
// as a hidden item).
4325-
if (unwrap_rollup_group(sub_item)->const_item()) {
4325+
if (unwrap_rollup_group(sub_item)->const_for_execution()) {
43264326
return {ReplaceResult::REPLACE, sub_item};
43274327
}
43284328
assert(false);

0 commit comments

Comments
 (0)