Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions sql/sql_executor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,9 @@ bool set_record_buffer(TABLE *table, double expected_rows_to_fetch) {
}
}

// Do not allocate space for more rows than the handler asked for.
rows_in_buffer = std::min(rows_in_buffer, max_rows);

// After adjustments made above, we still need a minimum of 2 rows to
// use a record buffer.
if (rows_in_buffer <= 1) {
Expand Down
Loading