Skip to content

Commit ba03601

Browse files
gurusamidahlerlend
authored andcommitted
Bug#36694153 Bulk load: Assertion '__n < this->size()' failed.
This is a post push fix for WL#16264. In the case of an array, we are allowed to do &array[size] - this is basically getting the address where the array ends. Doing the same for std::vector worked till now, but not anymore. Change-Id: Iffe648566b737e08c94e8d7f7479b3c94d1bb245
1 parent 75b2ee1 commit ba03601

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

storage/innobase/btr/btr0mtib.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,8 @@ dberr_t Page_extent::flush(fil_node_t *node, void *iov, size_t iov_size) {
544544
return err;
545545
}
546546

547-
std::sort(&m_page_loads[0], &m_page_loads[last()], Page_load_compare());
547+
std::sort(m_page_loads.begin(), m_page_loads.begin() + n_pages,
548+
Page_load_compare());
548549

549550
#ifdef UNIV_DEBUG
550551
for (size_t i = m_range.first, j = 0; i < m_range.second && j < n_pages;

0 commit comments

Comments
 (0)