Commit 267fc6f2 authored by Sergei Golubchik's avatar Sergei Golubchik

Master_info_index assumed that file descriptor can never be 0

parent 45ff0d62
......@@ -864,6 +864,7 @@ Master_info_index::Master_info_index()
memcpy(index_file_name + dir_length, "multi-", 6);
bzero((char*) &index_file, sizeof(index_file));
index_file.file= -1;
}
Master_info_index::~Master_info_index()
......@@ -871,7 +872,7 @@ Master_info_index::~Master_info_index()
/* This will close connection for all objects in the cache */
my_hash_free(&master_info_hash);
end_io_cache(&index_file);
if (index_file.file > 0)
if (index_file.file >= 0)
my_close(index_file.file, MYF(MY_WME));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment