mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 14:02:32 +01:00
branches/zip: row_merge_read_clustered_index(): After writing out the
merge buffer, write the next record to the beginning of the emptied buffer. This fixes one of the bugs mentioned in r1872.
This commit is contained in:
parent
fabcf6389b
commit
e4ed7666b4
1 changed files with 12 additions and 0 deletions
|
@ -1119,6 +1119,8 @@ row_merge_read_clustered_index(
|
|||
continue;
|
||||
}
|
||||
|
||||
/* The buffer must be sufficiently large
|
||||
to hold at least one record. */
|
||||
ut_ad(buf->n_tuples || !has_next);
|
||||
|
||||
/* We have enough data tuples to form a block.
|
||||
|
@ -1143,6 +1145,16 @@ row_merge_read_clustered_index(
|
|||
|
||||
UNIV_MEM_INVALID(block[0], sizeof block[0]);
|
||||
merge_buf[i] = row_merge_buf_empty(buf);
|
||||
|
||||
/* Try writing the record again, now that
|
||||
the buffer has been written out and emptied. */
|
||||
|
||||
if (UNIV_UNLIKELY
|
||||
(row && !row_merge_buf_add(buf, row, ext))) {
|
||||
/* An empty buffer should have enough
|
||||
room for at least one record. */
|
||||
ut_error;
|
||||
}
|
||||
}
|
||||
|
||||
mem_heap_empty(row_heap);
|
||||
|
|
Loading…
Reference in a new issue