Skip to content

Commit c63a3ed

Browse files
authored
Remove/increase the record size limit (#7332)
* Raised the record size limit * Represent the limit as 2^20 * Protect against extremely high InlineSortThreshold settings
1 parent 83c4c5f commit c63a3ed

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/jrd/optimizer/Optimizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1508,7 +1508,7 @@ SortedStream* Optimizer::generateSort(const StreamList& streams,
15081508
const auto* dbb = tdbb->getDatabase();
15091509
const auto threshold = dbb->dbb_config->getInlineSortThreshold();
15101510

1511-
refetchFlag = (totalLength > threshold);
1511+
refetchFlag = (totalLength > MIN(threshold, MAX_SORT_RECORD / 2));
15121512
}
15131513

15141514
// Check for persistent fields to be excluded from the sort.

src/jrd/val.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class VaryingString : public pool_alloc_rpt<SCHAR, type_str>
4949
UCHAR str_data[2]; // one byte for ALLOC and one for the NULL
5050
};
5151

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

5454
namespace Jrd {
5555

0 commit comments

Comments
 (0)