Merge lp:~laurynas-biveinis/percona-server/bug1262500-5.6 into lp:percona-server/5.6

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 523
Proposed branch: lp:~laurynas-biveinis/percona-server/bug1262500-5.6
Merge into: lp:percona-server/5.6
Diff against target: 36 lines (+7/-5)
1 file modified
Percona-Server/storage/innobase/os/os0file.cc (+7/-5)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug1262500-5.6
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Registry Administrators Pending
Review via email: mp+199704@code.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote :

The patch looks correct, but see bug #1263087

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Percona-Server/storage/innobase/os/os0file.cc'
--- Percona-Server/storage/innobase/os/os0file.cc 2013-12-05 17:23:10 +0000
+++ Percona-Server/storage/innobase/os/os0file.cc 2013-12-19 18:57:34 +0000
@@ -2477,12 +2477,13 @@
2477 os_mutex_exit(os_file_count_mutex);2477 os_mutex_exit(os_file_count_mutex);
2478#endif /* HAVE_ATOMIC_BUILTINS && UNIV_WORD == 8 */2478#endif /* HAVE_ATOMIC_BUILTINS && UNIV_WORD == 8 */
24792479
2480 /* Handle signal interruptions correctly */2480 /* Handle partial reads and signal interruptions correctly */
2481 for (n_bytes = 0; n_bytes < (ssize_t) n; ) {2481 for (n_bytes = 0; n_bytes < (ssize_t) n; ) {
2482 n_read = pread(file, buf, (ssize_t)n, offs);2482 n_read = pread(file, buf, (ssize_t)n - n_bytes, offs);
2483 if (n_read > 0) {2483 if (n_read > 0) {
2484 n_bytes += n_read;2484 n_bytes += n_read;
2485 offs += n_read;2485 offs += n_read;
2486 buf = (char *)buf + n_read;
2486 } else if (n_read == -1 && errno == EINTR) {2487 } else if (n_read == -1 && errno == EINTR) {
2487 continue;2488 continue;
2488 } else {2489 } else {
@@ -2624,12 +2625,13 @@
2624 MONITOR_ATOMIC_INC(MONITOR_OS_PENDING_WRITES);2625 MONITOR_ATOMIC_INC(MONITOR_OS_PENDING_WRITES);
2625#endif /* !HAVE_ATOMIC_BUILTINS || UNIV_WORD < 8 */2626#endif /* !HAVE_ATOMIC_BUILTINS || UNIV_WORD < 8 */
26262627
2627 /* Handle signal interruptions correctly */2628 /* Handle partial writes and signal interruptions correctly */
2628 for (ret = 0; ret < (ssize_t) n; ) {2629 for (ret = 0; ret < (ssize_t) n; ) {
2629 n_written = pwrite(file, buf, (ssize_t)n, offs);2630 n_written = pwrite(file, buf, (ssize_t)n - ret, offs);
2630 if (n_written > 0) {2631 if (n_written >= 0) {
2631 ret += n_written;2632 ret += n_written;
2632 offs += n_written;2633 offs += n_written;
2634 buf = (char *)buf + n_written;
2633 } else if (n_written == -1 && errno == EINTR) {2635 } else if (n_written == -1 && errno == EINTR) {
2634 continue;2636 continue;
2635 } else {2637 } else {

Subscribers

People subscribed via source and target branches