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