mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
Post Fix to Bug#14628410 - ASSERTION `! IS_SET()' FAILED IN
DIAGNOSTICS_AREA::SET_OK_STATUS Test fails on 5.1 valgrind build. This is because of close(-1) system call. Fixed by adding extra checks for valid file descriptor. Approved by Vasil(Calvin). rb#1792
This commit is contained in:
parent
1ef420b8d4
commit
eab9f8f4f4
1 changed files with 11 additions and 1 deletions
|
@ -2642,6 +2642,14 @@ row_merge_build_indexes(
|
|||
block_size = 3 * sizeof *block;
|
||||
block = os_mem_alloc_large(&block_size);
|
||||
|
||||
/* Initialize all the merge file descriptors, so that we
|
||||
don't call row_merge_file_destroy() on uninitialized
|
||||
merge file descriptor */
|
||||
|
||||
for (i = 0; i < n_indexes; i++) {
|
||||
merge_files[i].fd = -1;
|
||||
}
|
||||
|
||||
for (i = 0; i < n_indexes; i++) {
|
||||
|
||||
if (row_merge_file_create(&merge_files[i]) < 0)
|
||||
|
@ -2699,7 +2707,9 @@ row_merge_build_indexes(
|
|||
}
|
||||
|
||||
func_exit:
|
||||
if (tmpfd >= 0) {
|
||||
close(tmpfd);
|
||||
}
|
||||
|
||||
for (i = 0; i < n_indexes; i++) {
|
||||
row_merge_file_destroy(&merge_files[i]);
|
||||
|
|
Loading…
Reference in a new issue