Skip to content

Commit 2a272bc

Browse files
author
Chaithra Gopalareddy
committed
Merge branch 'mysql-8.0' into mysql-trunk
2 parents 7a24176 + b490ff4 commit 2a272bc

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

mysql-test/r/group_by.result

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4308,3 +4308,12 @@ HEX(CONCAT(MIN(b1))) HEX(CONCAT(MIN(b9))) HEX(CONCAT(MIN(b64)))
43084308
00 0000 0000000000000000
43094309
01 0100 8000000000000000
43104310
DROP TABLE t1;
4311+
#
4312+
# Bug#33515752: Data insertion exception in version 8.0.27
4313+
#
4314+
CREATE TABLE t1(f1 INTEGER);
4315+
INSERT INTO t1 VALUES(1);
4316+
SELECT SQL_BUFFER_RESULT MAX(f1)+1, 1 AS f2 FROM t1 GROUP BY f2;
4317+
MAX(f1)+1 f2
4318+
2 1
4319+
DROP TABLE t1;

mysql-test/t/group_by.test

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3254,3 +3254,14 @@ SELECT HEX(CONCAT(MIN(b1))), HEX(CONCAT(MIN(b9))), HEX(CONCAT(MIN(b64))) FROM t1
32543254
SELECT HEX(CONCAT(MIN(b1))), HEX(CONCAT(MIN(b9))), HEX(CONCAT(MIN(b64))) FROM t1 IGNORE INDEX(i1) GROUP BY id;
32553255

32563256
DROP TABLE t1;
3257+
3258+
--echo #
3259+
--echo # Bug#33515752: Data insertion exception in version 8.0.27
3260+
--echo #
3261+
3262+
CREATE TABLE t1(f1 INTEGER);
3263+
INSERT INTO t1 VALUES(1);
3264+
3265+
SELECT SQL_BUFFER_RESULT MAX(f1)+1, 1 AS f2 FROM t1 GROUP BY f2;
3266+
3267+
DROP TABLE t1;

sql/iterators/composite_iterators.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ bool AggregateIterator::Init() {
203203
//
204204
// This is a hack. It would be good to get rid of the slice system altogether
205205
// (the hypergraph join optimizer does not use it).
206-
if (!m_join->implicit_grouping && !thd()->lex->using_hypergraph_optimizer) {
206+
if (!(m_join->implicit_grouping || m_join->group_optimized_away) &&
207+
!thd()->lex->using_hypergraph_optimizer) {
207208
m_output_slice = m_join->get_ref_item_slice();
208209
}
209210

0 commit comments

Comments
 (0)