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

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Alexey Kopytov
Approved revision: 597
Merged at revision: 604
Proposed branch: lp:~laurynas-biveinis/percona-server/bug1262500-5.1
Merge into: lp:percona-server/5.1
Diff against target: 129 lines (+37/-5) (has conflicts)
5 files modified
Makefile (+5/-0)
Percona-Server/storage/innodb_plugin/os/os0file.c (+7/-5)
doc/source/conf.py (+13/-0)
doc/source/faq.rst (+8/-0)
doc/source/release-notes/release-notes_index.rst (+4/-0)
Text conflict in Makefile
Text conflict in doc/source/conf.py
Text conflict in doc/source/faq.rst
Text conflict in doc/source/release-notes/release-notes_index.rst
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug1262500-5.1
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Registry Administrators Pending
Review via email: mp+199699@code.launchpad.net

Description of the change

Fix bug 1262500 (ibd files contain bogus trailing zeros and non-page
size file sizes): in the case pwrite() was interrupted, the retried
write would not advance the buffer pointer, resulting in data
corruption. Also, the case of a partial write writing 0 bytes was not
handled.

Fix by applying a patch by Andrew Gaul, and extending to handle
pread() as well, except that a read would not be restarted if pread()
returned 0 bytes read, as that indicates an EOF instead of a partial
read.

http://jenkins.percona.com/job/percona-server-5.1-param/591/

To post a comment you must log in.
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Asking for either G2 or KAlexey's as the original code author's review

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

The change is os0file.c only, ignore the GCA-vs-trunk doc conflicts for the review.

Revision history for this message
Alexey Kopytov (akopytov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2013-12-05 07:33:20 +0000
3+++ Makefile 2013-12-19 18:50:56 +0000
4@@ -1,5 +1,10 @@
5+<<<<<<< TREE
6 MYSQL_VERSION=5.1.73
7 PERCONA_SERVER_VERSION=rel14.10
8+=======
9+MYSQL_VERSION=5.1.71
10+PERCONA_SERVER_VERSION=rel14.9
11+>>>>>>> MERGE-SOURCE
12 PERCONA_SERVER ?=Percona-Server-$(MYSQL_VERSION)-$(PERCONA_SERVER_VERSION)
13 PERCONA_SERVER_SHORT_1 ?=Percona-Server-$(MYSQL_VERSION)
14 PERCONA_SERVER_SHORT_2 ?=Percona-Server
15
16=== modified file 'Percona-Server/storage/innodb_plugin/buf/buf0buf.c'
17=== modified file 'Percona-Server/storage/innodb_plugin/handler/ha_innodb.cc'
18=== modified file 'Percona-Server/storage/innodb_plugin/log/log0online.c'
19=== modified file 'Percona-Server/storage/innodb_plugin/os/os0file.c'
20--- Percona-Server/storage/innodb_plugin/os/os0file.c 2013-06-03 03:53:55 +0000
21+++ Percona-Server/storage/innodb_plugin/os/os0file.c 2013-12-19 18:50:56 +0000
22@@ -2198,12 +2198,13 @@
23 os_n_pending_reads++;
24 os_mutex_exit(os_file_count_mutex);
25
26- /* Handle signal interruptions correctly */
27+ /* Handle partial reads and signal interruptions correctly */
28 for (n_bytes = 0; n_bytes < (ssize_t) n; ) {
29- n_read = pread(file, buf, (ssize_t)n, offs);
30+ n_read = pread(file, buf, (ssize_t)n - n_bytes, offs);
31 if (n_read > 0) {
32 n_bytes += n_read;
33 offs += n_read;
34+ buf = (char *)buf + n_read;
35 } else if (n_read == -1 && errno == EINTR) {
36 continue;
37 } else {
38@@ -2326,12 +2327,13 @@
39 os_n_pending_writes++;
40 os_mutex_exit(os_file_count_mutex);
41
42- /* Handle signal interruptions correctly */
43+ /* Handle partial writes and signal interruptions correctly */
44 for (ret = 0; ret < (ssize_t) n; ) {
45- n_written = pwrite(file, buf, (ssize_t)n, offs);
46- if (n_written > 0) {
47+ n_written = pwrite(file, buf, (ssize_t)n - ret, offs);
48+ if (n_written >= 0) {
49 ret += n_written;
50 offs += n_written;
51+ buf = (char *)buf + n_written;
52 } else if (n_written == -1 && errno == EINTR) {
53 continue;
54 } else {
55
56=== modified file 'Percona-Server/storage/innodb_plugin/srv/srv0srv.c'
57=== modified file 'doc/source/conf.py'
58--- doc/source/conf.py 2013-12-19 10:18:08 +0000
59+++ doc/source/conf.py 2013-12-19 18:50:56 +0000
60@@ -52,9 +52,17 @@
61 # built documents.
62 #
63 # The short X.Y version.
64+<<<<<<< TREE
65 version = '5.1.73'
66+=======
67+version = '5.1.71'
68+>>>>>>> MERGE-SOURCE
69 # The full version, including alpha/beta/rc tags.
70+<<<<<<< TREE
71 release = '5.1.73-14.11'
72+=======
73+release = '5.1.71-14.9'
74+>>>>>>> MERGE-SOURCE
75
76 # The language for content autogenerated by Sphinx. Refer to documentation
77 # for a list of supported languages.
78@@ -268,7 +276,12 @@
79 intersphinx_mapping = {
80 'ps51' : ('http://www.percona.com/doc/percona-server/5.1/', None),
81 'ps55' : ('http://www.percona.com/doc/percona-server/5.5/', None),
82+<<<<<<< TREE
83 'ps56' : ('http://www.percona.com/doc/percona-server/5.6/', None),
84 'xb21' : ('http://www.percona.com/doc/percona-xtrabackup/2.1', None),
85 'ptoolkit' : ('http://www.percona.com/doc/percona-toolkit/2.2/', None)
86+=======
87+ 'xtrabackup' : ('http://www.percona.com/doc/percona-xtrabackup/2.1', None),
88+ 'ptoolkit' : ('http://www.percona.com/doc/percona-toolkit/2.2/', None)
89+>>>>>>> MERGE-SOURCE
90 }
91
92=== modified file 'doc/source/faq.rst'
93--- doc/source/faq.rst 2013-12-19 10:18:08 +0000
94+++ doc/source/faq.rst 2013-12-19 18:50:56 +0000
95@@ -18,8 +18,16 @@
96 ===================================================
97
98 A: No, you don't need to change anything on the clients. |Percona Server| is 100% compatible with all existing client libraries and connectors.
99+<<<<<<< TREE
100
101 Q: When using the |Percona XtraBackup| to setup a replication slave on Debian based systems I'm getting: "ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)"
102 ==========================================================================================================================================================================================================
103
104 A: In case you're using init script on Debian based system to start ``mysqld``, be sure that the password for ``debian-sys-maint`` user has been updated and it's the same as that user's password from the server that the backup has been taken from. Password can be seen and updated in :file:`/etc/mysql/debian.cnf`. For more information on how to set up a replication slave using |Percona XtraBackup| see `this how-to <http://www.percona.com/doc/percona-xtrabackup/2.1/howtos/setting_up_replication.html>`_.
105+=======
106+
107+Q: When using the |Percona XtraBackup| to setup a replication slave on Debian based systems I'm getting: "ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)"
108+=========================================================================================================================================================================================================
109+
110+A: In case you're using init script on Debian based system to start ``mysqld``, be sure that the password for ``debian-sys-maint`` user has been updated and it's the same as that user's password from the server that the backup has been taken from. Password can be seen and updated in :file:`/etc/mysql/debian.cnf`. For more information on how to set up a replication slave using |Percona XtraBackup| see `this how-to <http://www.percona.com/doc/percona-xtrabackup/2.1/howtos/setting_up_replication.html>`_.
111+>>>>>>> MERGE-SOURCE
112
113=== modified file 'doc/source/release-notes/release-notes_index.rst'
114--- doc/source/release-notes/release-notes_index.rst 2013-12-19 10:18:08 +0000
115+++ doc/source/release-notes/release-notes_index.rst 2013-12-19 18:50:56 +0000
116@@ -7,9 +7,13 @@
117 :maxdepth: 1
118 :glob:
119
120+<<<<<<< TREE
121 Percona-Server-5.1.73-14.11
122 Percona-Server-5.1.72-14.10
123 Percona-Server-5.1.71-14.9
124+=======
125+ Percona-Server-5.1.71-14.9
126+>>>>>>> MERGE-SOURCE
127 Percona-Server-5.1.70-14.8
128 Percona-Server-5.1.69-14.7
129 Percona-Server-5.1.68-14.6

Subscribers

People subscribed via source and target branches