Commit 0490ebce authored by marko's avatar marko

branches/zip: os_file_pwrite(): Make the code compile in InnoDB Hot Backup

when the pwrite system call is not available.
parent 9c3cab88
......@@ -2168,16 +2168,20 @@ os_file_pwrite(
#else
{
off_t ret_offset;
# ifndef UNIV_HOTBACKUP
ulint i;
# endif /* !UNIV_HOTBACKUP */
os_mutex_enter(os_file_count_mutex);
os_n_pending_writes++;
os_mutex_exit(os_file_count_mutex);
# ifndef UNIV_HOTBACKUP
/* Protect the seek / write operation with a mutex */
i = ((ulint) file) % OS_FILE_N_SEEK_MUTEXES;
os_mutex_enter(os_file_seek_mutexes[i]);
# endif /* UNIV_HOTBACKUP */
ret_offset = lseek(file, offs, SEEK_SET);
......@@ -2203,7 +2207,9 @@ os_file_pwrite(
# endif /* UNIV_DO_FLUSH */
func_exit:
# ifndef UNIV_HOTBACKUP
os_mutex_exit(os_file_seek_mutexes[i]);
# endif /* !UNIV_HOTBACKUP */
os_mutex_enter(os_file_count_mutex);
os_n_pending_writes--;
......
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