Merge lp:~hrvojem/percona-server/bug930571-5.1 into lp:percona-server/5.1

Proposed by Hrvoje Matijakovic
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 432
Proposed branch: lp:~hrvojem/percona-server/bug930571-5.1
Merge into: lp:percona-server/5.1
Diff against target: 335 lines (+149/-20)
15 files modified
doc/source/compatibility.rst (+25/-0)
doc/source/diagnostics/misc_info_schema_tables.rst (+2/-0)
doc/source/index.rst (+2/-0)
doc/source/management/innodb_fake_changes.rst (+7/-1)
doc/source/performance/innodb_fast_checksum.rst (+1/-2)
doc/source/release-notes/Percona-Server-1.0.3-6.rst (+1/-1)
doc/source/release-notes/Percona-Server-1.0.4-8.rst (+5/-5)
doc/source/release-notes/Percona-Server-1.0.6-9.rst (+5/-5)
doc/source/release-notes/Percona-Server-5.1.47-rel11.1.rst (+1/-1)
doc/source/release-notes/Percona-Server-5.1.52-rel11.6.rst (+1/-1)
doc/source/release-notes/Percona-Server-5.1.53-12.4.rst (+1/-1)
doc/source/release-notes/Percona-Server-5.1.58-12.9.rst (+2/-2)
doc/source/reliability/innodb_recovery_update_relay_log.rst (+80/-0)
doc/source/scalability/innodb_expand_undo_slots.rst (+1/-1)
doc/source/scalability/innodb_io.rst (+15/-0)
To merge this branch: bzr merge lp:~hrvojem/percona-server/bug930571-5.1
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Alexey Kopytov Pending
Review via email: mp+97009@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Stewart Smith (stewart) wrote :

I think the following could be fixed, although it's not going to stop me merging this tree as is:

In "Relocation of the doublewrite buffer", "turned on/off without breaking the compatibility." can drop the "the".

In "doc/source/diagnostics/misc_info_schema_tables.rst", "Only the temporary tables that were explicitly created with `CREATE TEMPORARY TABLE` or `ALTER TABLE` are shown, and not the ones created to process complex queries." should drop the first "the" and "to process complex queries" should be replaced with "during query execution".

In "innodb_fake_changes.rst", "Restarting a slave server in a replication environment or setting up new slave server can cause a replication reads slower. This is happening because replication in |MySQL| is single-threaded and because it needs to read the data before it can execute the queries. The process can be speeded up by having prefetch threads to warm the server: replay statements and then rollback at commit." should be "Replication in |MySQL| is single-threaded and because it needs to read the data before it can execute the queries, this can decrease performance when the full data set is not already in the buffer pool. The fake changes feature allows a process to replay a set of operations against a replication slave to warm the buffer pool for the replication apply thread."

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'doc/source/compatibility.rst'
2--- doc/source/compatibility.rst 1970-01-01 00:00:00 +0000
3+++ doc/source/compatibility.rst 2012-04-02 07:10:25 +0000
4@@ -0,0 +1,25 @@
5+.. _compatibility:
6+
7+==============================================================
8+Options that make XtraDB tablespaces not compatible with MySQL
9+==============================================================
10+
11+Expanded undo slots
12+===================
13+
14+Enabling :variable:`innodb_extra_undoslots` breaks compatibility with other programs. Specifically, it makes the datafiles unusable for ibbackup or for a MySQL server that is not run with this option.
15+
16+Fast checksums
17+==============
18+
19+Enabling :variable:`innodb_fast_checksum` will use more CPU-efficient algorithm, based on 4-byte words which can be beneficial for some workloads. Once enabled, turning it off will require table to be dump/imported again, since it will fail to start on data files created when :variable:`innodb_fast_checksums` was enabled.
20+
21+Page sizes other than 16KiB
22+===========================
23+
24+This is controlled by variable :variable:`innodb_page_size`. Changing the page size for an existing database is not supported. Table will need to be dumped/imported again if compatibility with |MySQL| is required.
25+
26+Relocation of the doublewrite buffer
27+====================================
28+
29+Variable :variable:`innodb_doublewrite_file` provides an option to put the buffer on a dedicated disk in order to parallelize I/O activity on the buffer and on the tablespace. Only in case of crash recovery this variable cannot be changed, in all other cases it can be turned on/off without breaking compatibility.
30
31=== modified file 'doc/source/diagnostics/misc_info_schema_tables.rst'
32--- doc/source/diagnostics/misc_info_schema_tables.rst 2011-09-20 06:59:03 +0000
33+++ doc/source/diagnostics/misc_info_schema_tables.rst 2012-04-02 07:10:25 +0000
34@@ -98,6 +98,8 @@
35 Temporary tables
36 ================
37
38+ Only temporary tables that were explicitly created with `CREATE TEMPORARY TABLE` or `ALTER TABLE` are shown, and not the ones created during query execution.
39+
40 .. table:: INFORMATION_SCHEMA.GLOBAL_TEMPORARY_TABLES
41
42 :column SESSION_ID: |MySQL| connection id
43
44=== modified file 'doc/source/index.rst'
45--- doc/source/index.rst 2012-03-16 09:07:44 +0000
46+++ doc/source/index.rst 2012-04-02 07:10:25 +0000
47@@ -104,6 +104,7 @@
48 reliability/log_connection_error
49 reliability/error_pad
50 reliability/innodb_corrupt_table_action
51+ reliability/innodb_recovery_update_relay_log
52 reliability/show_slave_status_nolock
53
54 Management Improvements
55@@ -163,6 +164,7 @@
56 development
57 trademark-policy
58 faq
59+ compatibility
60 release-notes/release-notes_index
61 glossary
62
63
64=== modified file 'doc/source/management/innodb_fake_changes.rst'
65--- doc/source/management/innodb_fake_changes.rst 2011-10-14 02:52:34 +0000
66+++ doc/source/management/innodb_fake_changes.rst 2012-04-02 07:10:25 +0000
67@@ -4,7 +4,7 @@
68 Support for Fake Changes
69 ==========================
70
71-When restarting a slave server in a replication environment, the process can be speed up by having prefetch threads to warm the server: replay statements and then rollback at commit.
72+Replication in |MySQL| is single-threaded and because it needs to read the data before it can execute the queries, this can decrease performance when the full data set is not already in the buffer pool. The fake changes feature allows a process to replay a set of operations against a replication slave to warm the buffer pool for the replication apply thread.
73
74 That makes prefetch simple but has high overhead from locking rows only to undo changes at rollback.
75
76@@ -63,3 +63,9 @@
77 * It will not prefetch allocate/free, split/merge, ``INODE``, ``XDES`` or other management pages. The same is for extern pages, i.e. large ``BLOB`` s).
78
79 * Foreign key constraints are checked (for causing IO), but passed always.
80+
81+Related Reading
82+===============
83+
84+ * `on MySQL replication prefetching <http://dom.as/2011/12/03/replication-prefetching/>`_
85+
86
87=== modified file 'doc/source/performance/innodb_fast_checksum.rst'
88--- doc/source/performance/innodb_fast_checksum.rst 2011-10-07 00:55:06 +0000
89+++ doc/source/performance/innodb_fast_checksum.rst 2012-04-02 07:10:25 +0000
90@@ -10,8 +10,7 @@
91
92 The original algorithm is checked after the new one, so you can have data pages with old checksums and data pages with new checksums. However in this case, you may experience slow reads from pages having old checksums. If you want to have the entire benefit of this change, you will need to recreate all your |InnoDB| tables, for instance by dumping and reloading all |InnoDB| tables.
93
94-Once enabled, turning it off will require table re-creation as well, since it will fail to start on data files created when ``innodb_fast_checksums`` was enabled.
95-
96+Once enabled, turning it off will require table(s) to be dump/imported, since it will fail to start on data files created when ``innodb_fast_checksums`` was enabled. In this case ALTER TABLE won't work due to its implementation.
97
98 System Variables
99 ================
100
101=== modified file 'doc/source/release-notes/Percona-Server-1.0.3-6.rst'
102--- doc/source/release-notes/Percona-Server-1.0.3-6.rst 2011-10-07 00:55:06 +0000
103+++ doc/source/release-notes/Percona-Server-1.0.3-6.rst 2012-04-02 07:10:25 +0000
104@@ -27,7 +27,7 @@
105 Fixed bugs
106 ==========
107
108- * |MySQL| Bug: ``#39793 <http://bugs.mysql.com/39793>`_: Foreign keys not constructed when column has a ``#`` in a comment or default value
109+ * |MySQL| Bug: `#39793 <http://bugs.mysql.com/39793>`_: Foreign keys not constructed when column has a ``#`` in a comment or default value
110
111 * Bug :bug:`395784` in Percona-XtraDB: ``main.innodb_xtradb_bug317074 internal check fails on 5.1.36``
112
113
114=== modified file 'doc/source/release-notes/Percona-Server-1.0.4-8.rst'
115--- doc/source/release-notes/Percona-Server-1.0.4-8.rst 2011-09-26 22:00:30 +0000
116+++ doc/source/release-notes/Percona-Server-1.0.4-8.rst 2012-04-02 07:10:25 +0000
117@@ -13,10 +13,10 @@
118 Fixed bugs:
119 ===========
120
121- * [[https://bugs.launchpad.net/percona-xtradb/+bug/413858|Bugs#413858: Crash from failed assertion in dict0dict.c]]
122-
123- * [[https://bugs.launchpad.net/percona-xtradb/+bug/417751|Bug#417751: |XtraDB| crashes on startup on windows]]
124-
125- * [[https://code.launchpad.net/~percona-dev/percona-xtradb/fix-import-extern-pages|fix-import-extern-pages]]
126+ * :bug:`413858`: Crash from failed assertion in dict0dict.c]]
127+
128+ * :bug:`417751`: |XtraDB| crashes on startup on windows]]
129+
130+ * `fix-import-extern-pages <https://code.launchpad.net/~percona-dev/percona-xtradb/fix-import-extern-pages>`_
131
132 * Number of |MySQL|-tests are fixed
133
134=== modified file 'doc/source/release-notes/Percona-Server-1.0.6-9.rst'
135--- doc/source/release-notes/Percona-Server-1.0.6-9.rst 2011-09-26 22:00:30 +0000
136+++ doc/source/release-notes/Percona-Server-1.0.6-9.rst 2012-04-02 07:10:25 +0000
137@@ -28,8 +28,8 @@
138
139 Fixed bugs:
140
141- * Bug :bug:`488315`: rename columns and add unique index cause serious inconsistent with :command:`mysqld`
142-
143- * Bug :bug:495342]]: “MySQL 5.1.41 + InnoDB 1.0.6 + XtraDB patches extensions-1.0.6, rev. 127 fails to compile on OpenSolaris”
144-
145- * |MySQL| bug `#47621 <http://bugs.mysql.com/47621>`_: change the fix of http://bugs.mysql.com/47621 more reasonable
146+ * Bug :bug:`488315`: rename columns and add unique index cause serious inconsistent with :command:`mysqld`.
147+
148+ * Bug :bug:`495342`: MySQL 5.1.41 + InnoDB 1.0.6 + XtraDB patches extensions-1.0.6, rev. 127 fails to compile on OpenSolaris.
149+
150+ * |MySQL| bug `#47621 <http://bugs.mysql.com/47621>`_: change the fix of http://bugs.mysql.com/47621 more reasonable.
151
152=== modified file 'doc/source/release-notes/Percona-Server-5.1.47-rel11.1.rst'
153--- doc/source/release-notes/Percona-Server-5.1.47-rel11.1.rst 2011-09-26 22:00:30 +0000
154+++ doc/source/release-notes/Percona-Server-5.1.47-rel11.1.rst 2012-04-02 07:10:25 +0000
155@@ -36,7 +36,7 @@
156
157 * :bug:`580324` - Security bug in upstream
158
159- * :bug:`586579` -|Percona Server| 11 fails to compile with ``CFLAGS=-DUNIV_DEBUG``
160+ * :bug:`586579` - |Percona Server| 11 fails to compile with ``CFLAGS=-DUNIV_DEBUG``
161
162 * :bug:`569156` - CentOS 5: ``mysql-server`` conflicts with ``mysql-server``
163
164
165=== modified file 'doc/source/release-notes/Percona-Server-5.1.52-rel11.6.rst'
166--- doc/source/release-notes/Percona-Server-5.1.52-rel11.6.rst 2011-09-26 22:00:30 +0000
167+++ doc/source/release-notes/Percona-Server-5.1.52-rel11.6.rst 2012-04-02 07:10:25 +0000
168@@ -18,7 +18,7 @@
169 Bugs Fixed
170 ===========
171
172- * Bug :bug:`671764` - ``innochecksum`` wasn``t distributed with RPM and .DEB packages (Aleksandr Kuzminsky)
173+ * Bug :bug:`671764` - ``innochecksum`` wasn't distributed with RPM and .DEB packages (Aleksandr Kuzminsky)
174
175 * Bug :bug:`673426` - Use of some system variables as command-line options caused a crash or undefined behavior. (*Oleg Tsarev*)
176
177
178=== modified file 'doc/source/release-notes/Percona-Server-5.1.53-12.4.rst'
179--- doc/source/release-notes/Percona-Server-5.1.53-12.4.rst 2011-10-07 00:55:06 +0000
180+++ doc/source/release-notes/Percona-Server-5.1.53-12.4.rst 2012-04-02 07:10:25 +0000
181@@ -45,7 +45,7 @@
182
183 * Bug :bug:`677407` - The ``innodb_information_schema`` test could fail sporadically due to flawed logic in the ``INFORMATION_SCHEMA.INNODB_LOCKS`` caching mechanism. (contributed by *Kristian Nielsen*) (*Alexey Kopytov*)
184
185- * Bug :bug:`681486` - A dependency between Debian packages ``lib|MySQL|client16`` and ``percona-server-common`` was removed. (*Aleksandr Kuzminsky*)
186+ * Bug :bug:`681486` - A dependency between Debian packages ``libmysqlclient16`` and ``percona-server-common`` was removed. (*Aleksandr Kuzminsky*)
187
188 * Bug :bug:`693815` - The test ``percona_innodb_buffer_pool_shm`` was failing. It should be run with the ``--big-test`` option. As the buffer pool size used in the test is 128M, the shared memory segment should be increased appropriately in order to run the test successfully.
189
190
191=== modified file 'doc/source/release-notes/Percona-Server-5.1.58-12.9.rst'
192--- doc/source/release-notes/Percona-Server-5.1.58-12.9.rst 2011-12-03 02:46:52 +0000
193+++ doc/source/release-notes/Percona-Server-5.1.58-12.9.rst 2012-04-02 07:10:25 +0000
194@@ -23,7 +23,7 @@
195
196 Two new collations, ``utf8_general50_ci`` and ``ucs2_general50_ci``, have been to improve compatibility for those upgrading from |MySQL| 5.0 or 5.1 prior to version 5.1.24.
197
198-A fix for a |MySQL| bug ([[`#27877 <http://bugs.mysql.com/bug.php?id=27877>`) introduced an incompatible change in collations in |MySQL| 5.1.24. If the following collations were used:
199+A fix for a |MySQL| bug `#27877 <http://bugs.mysql.com/bug.php?id=27877>`_ introduced an incompatible change in collations in |MySQL| 5.1.24. If the following collations were used:
200
201 * ``utf8_general_ci``
202 * ``ucs2_general_ci``
203@@ -37,7 +37,7 @@
204 * ``utf8_general_ci`` to ``utf8_general50_ci``, and
205 * ``ucs2_general_ci`` to ``ucs2_general50_ci``.
206
207-Blueprint:[[https://blueprints.launchpad.net/percona-server/+spec/utf8-general50-ci-5.1|utf8-general50-ci-5.1]] (*Alexey Kopytov*).
208+Blueprint: `utf8-general50-ci-5.1 <https://blueprints.launchpad.net/percona-server/+spec/utf8-general50-ci-5.1>`_ (*Alexey Kopytov*).
209
210 SHM Buffer Pool has been removed
211 --------------------------------
212
213=== added file 'doc/source/reliability/innodb_recovery_update_relay_log.rst'
214--- doc/source/reliability/innodb_recovery_update_relay_log.rst 1970-01-01 00:00:00 +0000
215+++ doc/source/reliability/innodb_recovery_update_relay_log.rst 2012-04-02 07:10:25 +0000
216@@ -0,0 +1,80 @@
217+.. _innodb_recovery_update_relay_log_page:
218+
219+=============================
220+ Crash-Resistant Replication
221+=============================
222+
223+This feature makes replication much more reliable after a crash by making the replica's position relative to the master transactional.
224+
225+|MySQL| replication normally stores its position in a file that is neither durable nor consistent. Thus, if the replica crashes, it can re-execute committed transactions. This usually causes replication to fail, potentially forcing the replica's data to be re-initialized from the master or from a recent backup.
226+
227+The improvement in |Percona Server| makes |InnoDB| store the replication position transactionally, and overwrite the usual relay-log.info file upon recovery, so replication restarts from the correct position and does not try to re-execute committed transactions. This change greatly improves the durability of |MySQL| replication. It can be set to activate automatically, so replication “just works” and no intervention is necessary after a crash.
228+
229+
230+Restrictions
231+============
232+
233+When :variable:`innodb_overwrite_relay_log_info` is enabled, you should only update |InnoDB| / |XtraDB| tables, not |MyISAM| tables or other storage engines.
234+You should not use relay or binary log filenames longer than 480 characters (normal: up to 512). If longer, the replication position information is not recorded in |InnoDB|.
235+
236+Example Server Error Log Output
237+===============================
238+
239+Upon crash recovery, the error log on a replica will show information similar to the following: ::
240+
241+ InnoDB: Starting crash recovery.
242+ ....
243+ InnoDB: Apply batch completed
244+ InnoDB: In a MySQL replication slave the last master binlog file
245+ InnoDB: position 0 468, file name gauntlet3-bin.000015
246+ InnoDB: and relay log file
247+ InnoDB: position 0 617, file name ./gauntlet3-relay-bin.000111
248+
249+If this feature is enabled, the output will look like the following, with additional lines prefixed with a ``+`` symbol: ::
250+
251+ ....
252+ + InnoDB: Warning: innodb_overwrite_relay_log_info is enabled. Updates of other storage engines may have problem of consistency.
253+ + InnoDB: relay-log.info is detected.
254+ + InnoDB: relay log: position 429, file name ./gauntlet3-relay-bin.000111
255+ + InnoDB: master log: position 280, file name gauntlet3-bin.000015
256+ ....
257+ InnoDB: Starting crash recovery.
258+ ....
259+ InnoDB: Apply batch completed
260+ + InnoDB: In a MySQL replication slave the last master binlog file
261+ + InnoDB: position 0 468, file name gauntlet3-bin.000015
262+ + InnoDB: and relay log file
263+ + InnoDB: position 0 617, file name ./gauntlet3-relay-bin.000111
264+ 090205 17:41:31 InnoDB Plugin 1.0.2-3 started; log sequence number 57933
265+ + InnoDB: relay-log.info have been overwritten.
266+ ....
267+ 090205 17:41:31 [Note] Slave SQL thread initialized, starting replication in log ``gauntlet3-bin.000015`` at position 468, relay log ``./gauntlet3-relay-bin.000111`` position: 617
268+
269+In this case, the master log position was overwritten to 468 from 280, so replication will start at position 468 and not repeat the transaction beginning at 280.
270+
271+System Variables
272+================
273+
274+One new system variable was introduced by this feature.
275+
276+.. variable:: innodb_overwrite_relay_log_info
277+
278+ :version 5.5.10-20.1: Renamed.
279+ :cli: Yes
280+ :conf: Yes
281+ :scope: Global
282+ :dyn: No
283+ :vartype: BOOLEAN
284+ :default: FALSE
285+ :range: TRUE/FALSE
286+
287+If set to true, |InnoDB| overwrites :file:`relay-log.info` at crash recovery when the information is different from the record in |InnoDB|.
288+
289+Other Reading
290+=============
291+
292+ * Another solution for |MySQL| 5.0 is `Google's transactional replication feature <http://code.google.com/p/google-mysql-tools/wiki/TransactionalReplication>`_, but it had some problems and bugs.
293+
294+ * `Related bug (fixed and re-implemented in this feature) <http://bugs.|MySQL|.com/bug.php?id=34058>`_
295+
296+ * `A blog post explaining how this feature makes replication more reliable <http://www.|MySQL|performanceblog.com/2009/03/04/making-replication-a-bit-more-reliable/>`_
297
298=== modified file 'doc/source/scalability/innodb_expand_undo_slots.rst'
299--- doc/source/scalability/innodb_expand_undo_slots.rst 2011-10-07 00:55:06 +0000
300+++ doc/source/scalability/innodb_expand_undo_slots.rst 2012-04-02 07:10:25 +0000
301@@ -4,7 +4,7 @@
302 More Concurrent Transactions Available
303 ======================================
304
305-|InnoDB| provides a fixed number of 1024 undo slots in its rollback segment, leaving room for 1024 transactions to run in parallel. If all the slots are used any new transaction will fail until a slot is freed, which can cause st:range: behaviors. This change provides a variable to expand the number of undo slots, up to 4072.
306+|InnoDB| provides a fixed number of 1024 undo slots in its rollback segment, leaving room for 1024 transactions to run in parallel. If all the slots are used any new transaction will fail until a slot is freed, which can cause strange behaviors. This change provides a variable to expand the number of undo slots, up to 4072.
307
308 This option is provided for servers that run out of undo slots. Use it if you find the following warning in the error log: ``Warning: cannot find a free slot for an undo log``.
309
310
311=== modified file 'doc/source/scalability/innodb_io.rst'
312--- doc/source/scalability/innodb_io.rst 2012-03-09 08:03:43 +0000
313+++ doc/source/scalability/innodb_io.rst 2012-04-02 07:10:25 +0000
314@@ -188,6 +188,21 @@
315
316 This variable changes the size of transaction log records. The default size of 512 bytes is good in most situations. However, setting it to 4096 may be a good optimization with SSD cards. While settings other than 512 and 4096 are possible, as a practical matter these are really the only two that it makes sense to use.
317
318+.. variable:: innodb_log_file_size
319+
320+ :version 1.0.6-10: Introduced
321+ :cli: Yes
322+ :conf: Yes
323+ :scope: Global
324+ :dyn: No
325+ :type: Numeric
326+ :default: 5242880
327+ :range: 1048576 .. 4294967295
328+
329+In upstream |MySQL| the limit for the combined size of log files must be less than 4GB. But in Percona Server it is:
330+ * on 32-bit systems: individual log file limit is 4 GB and total log file size limit is 4 GB, i.e. the same as in the upstream server.
331+ * on 64-bit systems: both individual log files and total log file size are practically unlimited (the limit is 2^63 - 1 bytes which is 8+ million TB).
332+
333 .. variable:: innodb_read_ahead
334
335 :cli: Yes

Subscribers

People subscribed via source and target branches