Skip to content
Open
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/common/CvtFormat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ namespace
break;
}
if (strOffset >= strLength)
cb->err(Arg::Gds(isc_data_for_format_is_exhausted) << string(it->patternStr.data()));
cb->err(Arg::Gds(isc_data_for_format_is_exhausted) << string(it->patternStr));

std::string_view patternStr = it->patternStr;

Expand Down
42 changes: 22 additions & 20 deletions src/common/classes/fb_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -691,26 +691,28 @@ namespace Firebird
}
public:
StringBase() noexcept : AbstractString(Comparator::getMaxLength()) {}
StringBase(const StringType& v) : AbstractString(Comparator::getMaxLength(), v) {}
StringBase(const void* s, size_type n) : AbstractString(Comparator::getMaxLength(), n, s) {}
StringBase(const_pointer s) :
AbstractString(Comparator::getMaxLength(), s ? length(s) : 0, s) {}
explicit StringBase(const unsigned char* s) :
AbstractString(Comparator::getMaxLength(), length((char*) s), (char*) s) {}
StringBase(const MetaString& v) : AbstractString(Comparator::getMaxLength(), v) {}
StringBase(size_type n, char_type c) : AbstractString(Comparator::getMaxLength(), n, c) {}
StringBase(const_iterator first, const_iterator last) :
AbstractString(Comparator::getMaxLength(), last - first, first) {}
explicit StringBase(MemoryPool& p) noexcept : AbstractString(Comparator::getMaxLength(), p) {}
StringBase(MemoryPool& p, const AbstractString& v) : AbstractString(Comparator::getMaxLength(), p, v) {}
StringBase(MemoryPool& p, const_pointer s) :
AbstractString(Comparator::getMaxLength(), p, s, s ? length(s) : 0) {}
StringBase(MemoryPool& p, const char_type* s, size_type l) :
AbstractString(Comparator::getMaxLength(), p, s, l) {}
StringBase(StringType&& rhs) :
AbstractString(Comparator::getMaxLength(), std::forward<AbstractString>(rhs)) {}
StringBase(MemoryPool& p, StringType&& rhs) :
AbstractString(Comparator::getMaxLength(), p, std::forward<AbstractString>(rhs)) {}
StringBase(const StringType& v) : AbstractString(Comparator::getMaxLength(), v) {}
StringBase(const void* s, size_type n) : AbstractString(Comparator::getMaxLength(), n, s) {}
StringBase(const_pointer s) :
AbstractString(Comparator::getMaxLength(), s ? length(s) : 0, s) {}
StringBase(std::string_view sv) :
AbstractString(Comparator::getMaxLength(), static_cast<size_type>(sv.length()), sv.data()) {}
explicit StringBase(const unsigned char* s) :
AbstractString(Comparator::getMaxLength(), length((char*) s), (char*) s) {}
StringBase(const MetaString& v) : AbstractString(Comparator::getMaxLength(), v) {}
StringBase(size_type n, char_type c) : AbstractString(Comparator::getMaxLength(), n, c) {}
StringBase(const_iterator first, const_iterator last) :
AbstractString(Comparator::getMaxLength(), last - first, first) {}
explicit StringBase(MemoryPool& p) noexcept : AbstractString(Comparator::getMaxLength(), p) {}
StringBase(MemoryPool& p, const AbstractString& v) : AbstractString(Comparator::getMaxLength(), p, v) {}
StringBase(MemoryPool& p, const_pointer s) :
AbstractString(Comparator::getMaxLength(), p, s, s ? length(s) : 0) {}
StringBase(MemoryPool& p, const char_type* s, size_type l) :
AbstractString(Comparator::getMaxLength(), p, s, l) {}
StringBase(StringType&& rhs) :
AbstractString(Comparator::getMaxLength(), std::forward<AbstractString>(rhs)) {}
StringBase(MemoryPool& p, StringType&& rhs) :
AbstractString(Comparator::getMaxLength(), p, std::forward<AbstractString>(rhs)) {}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, fix indentation of the block above (lines 694-715)


static size_type max_length() noexcept
{
Expand Down
6 changes: 3 additions & 3 deletions src/jrd/btr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6428,7 +6428,7 @@ static ULONG insert_node(thread_db* tdbb,
// For checking on duplicate nodes we should find the first matching key.
UCHAR* pointer = find_node_start_point(bucket, key, 0, &prefix,
idx->idx_flags & idx_descending,
false, true, validateDuplicates ? NO_VALUE : newRecordNumber);
0, true, validateDuplicates ? NO_VALUE : newRecordNumber);
if (!pointer)
return NO_VALUE_PAGE;

Expand Down Expand Up @@ -7235,8 +7235,8 @@ static contents remove_leaf_node(thread_db* tdbb, index_insertion* insertion, WI
UCHAR* pointer;
USHORT prefix;
while (!(pointer = find_node_start_point(page, key, 0, &prefix,
(idx->idx_flags & idx_descending),
false, false,
idx->idx_flags & idx_descending,
0, false,
(validateDuplicates ? NO_VALUE : insertion->iib_number))))
{
page = (btree_page*) CCH_HANDOFF(tdbb, window, page->btr_sibling, LCK_write, pag_index);
Expand Down