Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/jrd/optimizer/Optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1508,7 +1508,7 @@ SortedStream* Optimizer::generateSort(const StreamList& streams,
const auto* dbb = tdbb->getDatabase();
const auto threshold = dbb->dbb_config->getInlineSortThreshold();

refetchFlag = (totalLength > threshold);
refetchFlag = (totalLength > MIN(threshold, MAX_SORT_RECORD / 2));
}

// Check for persistent fields to be excluded from the sort.
Expand Down
2 changes: 1 addition & 1 deletion src/jrd/val.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class VaryingString : public pool_alloc_rpt<SCHAR, type_str>
UCHAR str_data[2]; // one byte for ALLOC and one for the NULL
};

inline constexpr ULONG MAX_RECORD_SIZE = 65535;
inline constexpr ULONG MAX_RECORD_SIZE = 1048576; // 1 MB -- just to protect from possible misuse

namespace Jrd {

Expand Down
Loading