Merge lp:~tsarev/percona-server/5.5.19 into lp:percona-server/5.5

Proposed by Oleg Tsarev
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 203
Proposed branch: lp:~tsarev/percona-server/5.5.19
Merge into: lp:percona-server/5.5
Diff against target: 4209 lines (+525/-506)
41 files modified
Makefile (+1/-1)
patches/bug860910.patch (+1/-1)
patches/control_online_alter_index.patch (+3/-3)
patches/group_commit.patch (+132/-119)
patches/innodb_adaptive_hash_index_partitions.patch (+9/-9)
patches/innodb_admin_command_base.patch (+3/-3)
patches/innodb_buffer_pool_pages_i_s.patch (+2/-2)
patches/innodb_buffer_pool_shm.patch (+4/-4)
patches/innodb_dict_size_limit.patch (+3/-3)
patches/innodb_expand_fast_index_creation.patch (+10/-10)
patches/innodb_expand_import.patch (+3/-3)
patches/innodb_extend_slow.patch (+23/-23)
patches/innodb_extra_rseg.patch (+1/-1)
patches/innodb_fake_changes.patch (+22/-22)
patches/innodb_fast_checksum.patch (+3/-3)
patches/innodb_files_extend.patch (+6/-6)
patches/innodb_fix_misc.patch (+20/-20)
patches/innodb_io_patches.patch (+8/-8)
patches/innodb_kill_idle_transaction.patch (+3/-3)
patches/innodb_lru_dump_restore.patch (+5/-5)
patches/innodb_opt_lru_count.patch (+4/-4)
patches/innodb_overwrite_relay_log_info.patch (+2/-2)
patches/innodb_pass_corrupt_table.patch (+38/-38)
patches/innodb_recovery_patches.patch (+2/-2)
patches/innodb_separate_doublewrite.patch (+8/-8)
patches/innodb_show_lock_name.patch (+4/-4)
patches/innodb_show_status.patch (+6/-6)
patches/innodb_show_status_extend.patch (+1/-1)
patches/innodb_show_sys_tables.patch (+1/-1)
patches/innodb_split_buf_pool_mutex.patch (+88/-88)
patches/innodb_stats.patch (+22/-22)
patches/innodb_thread_concurrency_timer_based.patch (+2/-2)
patches/log_warnings_suppress.patch (+4/-4)
patches/mysql-test.diff (+8/-2)
patches/optimizer_fix.patch (+1/-1)
patches/processlist_row_stats.patch (+1/-1)
patches/query_cache_enhance.patch (+13/-13)
patches/response_time_distribution.patch (+3/-3)
patches/show_temp.patch (+1/-1)
patches/slow_extended.patch (+23/-23)
patches/userstat.patch (+31/-31)
To merge this branch: bzr merge lp:~tsarev/percona-server/5.5.19
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Laurynas Biveinis (community) Needs Fixing
Review via email: mp+87054@code.launchpad.net

Description of the change

Porting to 5.5.19
1) removed mysql-test/suite/innodb/t/innodb_cmp_drop_table-master.opt, incorrect setup of innodb-buffer-pool-size (according to innodb_io_patches min value changed to 32M)
2) Changed logic of MYSQL_BIN_LOG::trx_group_commit_leader related to changed in 5.5.19 logic of work with mutex LOCK_log
3) Little changes in percona_server_variables_{debug|release}

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

Jenkins results show 320 failures, I think that's way too much to merge even if it's all Jenkins trouble, and that's even with Oneiric not having their regular failures. Can you restart the job to get better results?

review: Needs Fixing
Revision history for this message
Stewart Smith (stewart) wrote :

I restarted job, merged with latest fixes and going through merge proposal of my branch (which passes better than trunk).... i.e. setting this one to approved too.

Revision history for this message
Stewart Smith (stewart) :
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 2011-12-05 08:44:44 +0000
3+++ Makefile 2011-12-29 02:23:24 +0000
4@@ -1,6 +1,6 @@
5 FETCH_CMD=wget
6 MASTER_SITE=http://s3.amazonaws.com/percona.com/downloads/community
7-MYSQL_VERSION=5.5.18
8+MYSQL_VERSION=5.5.19
9 PERCONA_SERVER_VERSION=rel21.0
10 PERCONA_SERVER ?=Percona-Server-$(MYSQL_VERSION)-$(PERCONA_SERVER_VERSION)
11 PERCONA_SERVER_SHORT_1 ?=Percona-Server-$(MYSQL_VERSION)
12
13=== modified file 'patches/bug860910.patch'
14--- patches/bug860910.patch 2011-12-13 13:49:04 +0000
15+++ patches/bug860910.patch 2011-12-29 02:23:24 +0000
16@@ -77,7 +77,7 @@
17 +--source include/rpl_end.inc
18 --- a/sql/log.cc
19 +++ b/sql/log.cc
20-@@ -5079,6 +5079,12 @@
21+@@ -5076,6 +5076,12 @@
22 user_var_event->type,
23 user_var_event->charset_number,
24 flags);
25
26=== modified file 'patches/control_online_alter_index.patch'
27--- patches/control_online_alter_index.patch 2011-08-09 20:52:20 +0000
28+++ patches/control_online_alter_index.patch 2011-12-29 02:23:24 +0000
29@@ -18,7 +18,7 @@
30 supported at all.
31 --- a/sql/sql_class.h
32 +++ b/sql/sql_class.h
33-@@ -481,6 +481,8 @@
34+@@ -479,6 +479,8 @@
35 my_bool engine_condition_pushdown;
36 my_bool keep_files_on_create;
37
38@@ -45,7 +45,7 @@
39 goto err;
40 --- a/sql/sql_table.cc
41 +++ b/sql/sql_table.cc
42-@@ -6140,6 +6140,10 @@
43+@@ -6146,6 +6146,10 @@
44 uint *idx_end_p;
45
46 alter_flags= table->file->alter_table_flags(alter_info->flags);
47@@ -58,7 +58,7 @@
48 for (idx_p= index_drop_buffer, idx_end_p= idx_p + index_drop_count;
49 --- a/sql/sys_vars.cc
50 +++ b/sql/sys_vars.cc
51-@@ -2186,6 +2186,13 @@
52+@@ -2192,6 +2192,13 @@
53 GLOBAL_VAR(opt_optimizer_fix),
54 NO_CMD_LINE, DEFAULT(TRUE));
55
56
57=== modified file 'patches/group_commit.patch'
58--- patches/group_commit.patch 2011-12-15 07:49:37 +0000
59+++ patches/group_commit.patch 2011-12-29 02:23:24 +0000
60@@ -282,15 +282,7 @@
61 int (*recover)(handlerton *hton, XID *xid_list, uint len);
62 --- a/sql/log.cc
63 +++ b/sql/log.cc
64-@@ -49,6 +49,7 @@
65-
66- #include "sql_plugin.h"
67- #include "rpl_handler.h"
68-+#include "debug_sync.h"
69-
70- /* max size of the log message */
71- #define MAX_LOG_BUFFER_SIZE 1024
72-@@ -71,6 +72,25 @@
73+@@ -71,6 +71,25 @@
74 static int binlog_rollback(handlerton *hton, THD *thd, bool all);
75 static int binlog_prepare(handlerton *hton, THD *thd, bool all);
76
77@@ -316,7 +308,7 @@
78 /**
79 purge logs, master and slave sides both, related error code
80 convertor.
81-@@ -167,41 +187,6 @@
82+@@ -167,41 +186,6 @@
83 }
84
85 /*
86@@ -358,7 +350,7 @@
87 Helper classes to store non-transactional and transactional data
88 before copying it to the binary log.
89 */
90-@@ -211,7 +196,8 @@
91+@@ -211,7 +195,8 @@
92 binlog_cache_data(): m_pending(0), before_stmt_pos(MY_OFF_T_UNDEF),
93 incident(FALSE), changes_to_non_trans_temp_table_flag(FALSE),
94 saved_max_binlog_cache_size(0), ptr_binlog_cache_use(0),
95@@ -368,7 +360,7 @@
96 { }
97
98 ~binlog_cache_data()
99-@@ -270,6 +256,8 @@
100+@@ -270,6 +255,8 @@
101 variable after truncating the cache.
102 */
103 cache_log.disk_writes= 0;
104@@ -377,7 +369,7 @@
105 DBUG_ASSERT(empty());
106 }
107
108-@@ -411,6 +399,20 @@
109+@@ -411,6 +398,20 @@
110
111 binlog_cache_data& operator=(const binlog_cache_data& info);
112 binlog_cache_data(const binlog_cache_data& info);
113@@ -398,7 +390,7 @@
114 };
115
116 class binlog_cache_mngr {
117-@@ -1627,7 +1629,7 @@
118+@@ -1624,7 +1625,7 @@
119 */
120 static inline int
121 binlog_flush_cache(THD *thd, binlog_cache_data* cache_data, Log_event *end_evt,
122@@ -407,7 +399,7 @@
123 {
124 DBUG_ENTER("binlog_flush_cache");
125 int error= 0;
126-@@ -1646,8 +1648,8 @@
127+@@ -1643,8 +1644,8 @@
128 were, we would have to ensure that we're not ending a statement
129 inside a stored function.
130 */
131@@ -418,7 +410,7 @@
132 }
133 cache_data->reset();
134
135-@@ -1666,12 +1668,12 @@
136+@@ -1663,12 +1664,12 @@
137 */
138 static inline int
139 binlog_commit_flush_stmt_cache(THD *thd,
140@@ -433,7 +425,7 @@
141 }
142
143 /**
144-@@ -1684,12 +1686,12 @@
145+@@ -1681,12 +1682,12 @@
146 nonzero if an error pops up when flushing the cache.
147 */
148 static inline int
149@@ -448,7 +440,7 @@
150 }
151
152 /**
153-@@ -1702,12 +1704,12 @@
154+@@ -1699,12 +1700,12 @@
155 nonzero if an error pops up when flushing the cache.
156 */
157 static inline int
158@@ -463,7 +455,7 @@
159 }
160
161 /**
162-@@ -1722,11 +1724,11 @@
163+@@ -1719,11 +1720,11 @@
164 */
165 static inline int
166 binlog_commit_flush_trx_cache(THD *thd, binlog_cache_mngr *cache_mngr,
167@@ -477,7 +469,7 @@
168 }
169
170 /**
171-@@ -1788,7 +1790,7 @@
172+@@ -1785,7 +1786,7 @@
173 do nothing.
174 just pretend we can do 2pc, so that MySQL won't
175 switch to 1pc.
176@@ -486,7 +478,7 @@
177 */
178 return 0;
179 }
180-@@ -1821,7 +1823,7 @@
181+@@ -1818,7 +1819,7 @@
182
183 if (!cache_mngr->stmt_cache.empty())
184 {
185@@ -495,7 +487,7 @@
186 }
187
188 if (cache_mngr->trx_cache.empty())
189-@@ -1840,7 +1842,7 @@
190+@@ -1837,7 +1838,7 @@
191 Otherwise, we accumulate the changes.
192 */
193 if (!error && ending_trans(thd, all))
194@@ -504,7 +496,7 @@
195
196 /*
197 This is part of the stmt rollback.
198-@@ -1884,7 +1886,7 @@
199+@@ -1881,7 +1882,7 @@
200 }
201 else if (!cache_mngr->stmt_cache.empty())
202 {
203@@ -513,7 +505,7 @@
204 }
205
206 if (cache_mngr->trx_cache.empty())
207-@@ -1932,7 +1934,7 @@
208+@@ -1929,7 +1930,7 @@
209 (trans_has_updated_non_trans_table(thd) &&
210 ending_single_stmt_trans(thd,all) &&
211 thd->variables.binlog_format == BINLOG_FORMAT_MIXED)))
212@@ -522,7 +514,7 @@
213 /*
214 Truncate the cache if:
215 . aborting a single or multi-statement transaction or;
216-@@ -2907,6 +2909,7 @@
217+@@ -2904,6 +2905,7 @@
218 MYSQL_BIN_LOG::MYSQL_BIN_LOG(uint *sync_period)
219 :bytes_written(0), prepared_xids(0), file_id(1), open_count(1),
220 need_start_event(TRUE),
221@@ -530,7 +522,7 @@
222 sync_period_ptr(sync_period),
223 is_relay_log(0), signal_cnt(0),
224 description_event_for_exec(0), description_event_for_queue(0)
225-@@ -5279,19 +5282,15 @@
226+@@ -5325,19 +5327,15 @@
227 SYNOPSIS
228 write_cache()
229 cache Cache to write to the binary log
230@@ -552,7 +544,7 @@
231 if (reinit_io_cache(cache, READ_CACHE, 0, 0, 0))
232 return ER_ERROR_ON_WRITE;
233 uint length= my_b_bytes_in_cache(cache), group, carry, hdr_offs;
234-@@ -5402,6 +5401,8 @@
235+@@ -5448,6 +5446,8 @@
236 }
237
238 /* Write data to the binary log file */
239@@ -561,7 +553,7 @@
240 if (my_b_write(&log_file, cache->read_pos, length))
241 return ER_ERROR_ON_WRITE;
242 thd->binlog_bytes_written+= length;
243-@@ -5410,9 +5411,6 @@
244+@@ -5456,9 +5456,6 @@
245
246 DBUG_ASSERT(carry == 0);
247
248@@ -571,7 +563,7 @@
249 return 0; // All OK
250 }
251
252-@@ -5453,8 +5451,6 @@
253+@@ -5499,8 +5496,6 @@
254 if (!is_open())
255 DBUG_RETURN(error);
256
257@@ -580,7 +572,7 @@
258 Incident incident= INCIDENT_LOST_EVENTS;
259 Incident_log_event ev(thd, incident, write_error_msg);
260 if (lock)
261-@@ -5496,104 +5492,320 @@
262+@@ -5549,112 +5544,332 @@
263 'cache' needs to be reinitialized after this functions returns.
264 */
265
266@@ -589,8 +581,7 @@
267 +bool
268 +MYSQL_BIN_LOG::write_transaction_to_binlog(THD *thd, binlog_cache_data *cache_data,
269 + Log_event *end_ev, bool all)
270- {
271-- DBUG_ENTER("MYSQL_BIN_LOG::write(THD *, IO_CACHE *, Log_event *)");
272++{
273 + group_commit_entry entry;
274 + bool ret;
275 + DBUG_ENTER("MYSQL_BIN_LOG::write_transaction_to_binlog");
276@@ -631,7 +622,8 @@
277 +
278 +bool
279 +MYSQL_BIN_LOG::write_transaction_to_binlog_events(group_commit_entry *entry)
280-+{
281+ {
282+- DBUG_ENTER("MYSQL_BIN_LOG::write(THD *, IO_CACHE *, Log_event *)");
283 + /*
284 + To facilitate group commit for the binlog, we first queue up ourselves in
285 + the group commit queue. Then the first thread to enter the queue waits for
286@@ -678,7 +670,7 @@
287 + "Error writing transaction to binary log: %d",
288 + MYF(ME_NOREFRESH), entry->error);
289 + }
290-+
291+
292 + /*
293 + Since we return error, this transaction XID will not be committed, so
294 + we need to mark it as not needed for recovery (unlog() is not called
295@@ -706,38 +698,42 @@
296 + DBUG_ENTER("MYSQL_BIN_LOG::trx_group_commit_leader");
297 + uint xid_count= 0;
298 + uint write_count= 0;
299-+
300-+ /*
301-+ Lock the LOCK_log(), and once we get it, collect any additional writes
302-+ that queued up while we were waiting.
303-+ */
304- mysql_mutex_lock(&LOCK_log);
305-+ DEBUG_SYNC(leader->thd, "commit_after_get_LOCK_log");
306-+ mysql_mutex_lock(&LOCK_group_commit_queue);
307-+ group_commit_entry *current= group_commit_queue;
308-+ group_commit_queue= NULL;
309-+ mysql_mutex_unlock(&LOCK_group_commit_queue);
310-+
311-+ /* As the queue is in reverse order of entering, reverse it. */
312-+ group_commit_entry *queue= NULL;
313-+ while (current)
314-+ {
315-+ group_commit_entry *next= current->next;
316-+ current->next= queue;
317-+ queue= current;
318-+ current= next;
319-+ }
320-+ DBUG_ASSERT(leader == queue /* the leader should be first in queue */);
321-
322-+ /* Now we have in queue the list of transactions to be committed in order. */
323++ bool check_purge= false;
324++ group_commit_entry *current= 0;
325 DBUG_ASSERT(is_open());
326 if (likely(is_open())) // Should always be true
327 {
328+- bool check_purge;
329+-
330++ /*
331++ Lock the LOCK_log(), and once we get it, collect any additional writes
332++ that queued up while we were waiting.
333++ */
334+ mysql_mutex_lock(&LOCK_log);
335++
336++ DEBUG_SYNC(leader->thd, "commit_after_get_LOCK_log");
337++ mysql_mutex_lock(&LOCK_group_commit_queue);
338++ current= group_commit_queue;
339++ group_commit_queue= NULL;
340++ mysql_mutex_unlock(&LOCK_group_commit_queue);
341++
342++ /* As the queue is in reverse order of entering, reverse it. */
343++ group_commit_entry *queue= NULL;
344++ while (current)
345++ {
346++ group_commit_entry *next= current->next;
347++ current->next= queue;
348++ queue= current;
349++ current= next;
350++ }
351++ DBUG_ASSERT(leader == queue /* the leader should be first in queue */);
352 /*
353 - We only bother to write to the binary log if there is anything
354 - to write.
355 - */
356 - if (my_b_tell(cache) > 0)
357++ Now we have in queue the list of transactions to be committed in order.
358++
359 + Commit every transaction in the queue.
360 +
361 + Note that we are doing this in a different thread than the one running
362@@ -771,28 +767,28 @@
363 - DBUG_PRINT("info", ("crashing before writing xid"));
364 - DBUG_SUICIDE();
365 - });
366+-
367+- if ((write_error= write_cache(thd, cache, false, false)))
368+- goto err;
369+-
370+- if (commit_event && commit_event->write(&log_file))
371+- goto err;
372+- if (commit_event)
373+- thd->binlog_bytes_written+= commit_event->data_written;
374 + if (my_b_tell(cache) > 0)
375 + {
376 + if ((current->error= write_transaction(current)))
377 + current->commit_errno= errno;
378-
379-- if ((write_error= write_cache(thd, cache, false, false)))
380-- goto err;
381 + write_count++;
382 + }
383
384-- if (commit_event && commit_event->write(&log_file))
385+- if (incident && write_incident(thd, FALSE))
386 - goto err;
387-- if (commit_event)
388-- thd->binlog_bytes_written+= commit_event->data_written;
389 + cache_data->commit_bin_log_file_pos= my_b_write_tell(&log_file);
390 + if (cache_data->using_xa && cache_data->xa_xid)
391 + xid_count++;
392 + }
393
394-- if (incident && write_incident(thd, FALSE))
395-- goto err;
396-
397 + if (write_count > 0)
398 + {
399 bool synced= 0;
400@@ -856,11 +852,16 @@
401 - mysql_mutex_lock(&LOCK_prep_xids);
402 - prepared_xids++;
403 - mysql_mutex_unlock(&LOCK_prep_xids);
404+- mysql_mutex_unlock(&LOCK_log);
405 + mark_xids_active(xid_count);
406 }
407 else
408- if (rotate_and_purge(RP_LOCK_LOG_IS_ALREADY_LOCKED))
409+ {
410+ if (rotate(false, &check_purge))
411 - goto err;
412+- mysql_mutex_unlock(&LOCK_log);
413+- if (check_purge)
414+- purge();
415 + {
416 + for (current= queue; current != NULL; current= current->next)
417 + {
418@@ -871,56 +872,67 @@
419 + }
420 + }
421 + }
422- }
423-+ DEBUG_SYNC(leader->thd, "commit_before_get_LOCK_commit_ordered");
424-+ mysql_mutex_lock(&LOCK_commit_ordered);
425-+ /*
426-+ We cannot unlock LOCK_log until we have locked LOCK_commit_ordered;
427-+ otherwise scheduling could allow the next group commit to run ahead of us,
428-+ messing up the order of commit_ordered() calls. But as soon as
429-+ LOCK_commit_ordered is obtained, we can let the next group commit start.
430-+ */
431- mysql_mutex_unlock(&LOCK_log);
432-+ DEBUG_SYNC(leader->thd, "commit_after_release_LOCK_log");
433-+ ++num_group_commits;
434+ }
435+- }
436
437 - DBUG_RETURN(0);
438--
439++ DEBUG_SYNC(leader->thd, "commit_before_get_LOCK_commit_ordered");
440++ mysql_mutex_lock(&LOCK_commit_ordered);
441++ /*
442++ We cannot unlock LOCK_log until we have locked LOCK_commit_ordered;
443++ otherwise scheduling could allow the next group commit to run ahead of us,
444++ messing up the order of commit_ordered() calls. But as soon as
445++ LOCK_commit_ordered is obtained, we can let the next group commit start.
446++ */
447+
448 -err:
449 - if (!write_error)
450-+ /*
451-+ Wakeup each participant waiting for our group commit, first calling the
452-+ commit_ordered() methods for any transactions doing 2-phase commit.
453-+ */
454-+ current= queue;
455-+ while (current != NULL)
456- {
457+- {
458 - write_error= 1;
459 - sql_print_error(ER(ER_ERROR_ON_WRITE), name, errno);
460-+ group_commit_entry *next;
461-+
462-+ DEBUG_SYNC(leader->thd, "commit_loop_entry_commit_ordered");
463-+ ++num_commits;
464-+ if (current->cache_data->using_xa && !current->error)
465-+ run_commit_ordered(current->thd, current->all);
466++ mysql_mutex_unlock(&LOCK_log);
467++
468++ if (xid_count > 0 && check_purge)
469++ {
470++ purge();
471++ }
472++
473++ DEBUG_SYNC(leader->thd, "commit_after_release_LOCK_log");
474++ ++num_group_commits;
475 +
476 + /*
477-+ Careful not to access current->next after waking up the other thread! As
478-+ it may change immediately after wakeup.
479++ Wakeup each participant waiting for our group commit, first calling the
480++ commit_ordered() methods for any transactions doing 2-phase commit.
481 + */
482-+ next= current->next;
483-+ if (current != leader) // Don't wake up ourself
484-+ current->thd->signal_wakeup_ready();
485-+ current= next;
486++ current= queue;
487++ while (current != NULL)
488++ {
489++ group_commit_entry *next;
490++
491++ DEBUG_SYNC(leader->thd, "commit_loop_entry_commit_ordered");
492++ ++num_commits;
493++ if (current->cache_data->using_xa && !current->error)
494++ run_commit_ordered(current->thd, current->all);
495++
496++ /*
497++ Careful not to access current->next after waking up the other thread! As
498++ it may change immediately after wakeup.
499++ */
500++ next= current->next;
501++ if (current != leader) // Don't wake up ourself
502++ current->thd->signal_wakeup_ready();
503++ current= next;
504++ }
505++ DEBUG_SYNC(leader->thd, "commit_after_group_run_commit_ordered");
506++ mysql_mutex_unlock(&LOCK_commit_ordered);
507 }
508 - mysql_mutex_unlock(&LOCK_log);
509 - DBUG_RETURN(1);
510-+ DEBUG_SYNC(leader->thd, "commit_after_group_run_commit_ordered");
511-+ mysql_mutex_unlock(&LOCK_commit_ordered);
512 +
513 + DBUG_VOID_RETURN;
514 }
515
516+
517 +int
518 +MYSQL_BIN_LOG::write_transaction(group_commit_entry *entry)
519 +{
520@@ -955,10 +967,11 @@
521 +
522 + return 0;
523 +}
524-
525++
526 /**
527 Wait until we get a signal that the relay log has been updated.
528-@@ -5999,6 +6211,68 @@
529+
530+@@ -6059,6 +6274,68 @@
531 }
532
533
534@@ -1027,7 +1040,7 @@
535 /********* transaction coordinator log for 2pc - mmap() based solution *******/
536
537 /*
538-@@ -6135,6 +6409,7 @@
539+@@ -6195,6 +6472,7 @@
540 mysql_mutex_init(key_LOCK_pool, &LOCK_pool, MY_MUTEX_INIT_FAST);
541 mysql_cond_init(key_COND_active, &COND_active, 0);
542 mysql_cond_init(key_COND_pool, &COND_pool, 0);
543@@ -1035,7 +1048,7 @@
544
545 inited=6;
546
547-@@ -6142,6 +6417,8 @@
548+@@ -6202,6 +6480,8 @@
549 active=pages;
550 pool=pages+1;
551 pool_last=pages+npages-1;
552@@ -1044,7 +1057,7 @@
553
554 return 0;
555
556-@@ -6247,7 +6524,7 @@
557+@@ -6307,7 +6587,7 @@
558 to the position in memory where xid was logged to.
559 */
560
561@@ -1053,7 +1066,7 @@
562 {
563 int err;
564 PAGE *p;
565-@@ -6386,7 +6663,9 @@
566+@@ -6446,7 +6726,9 @@
567 mysql_mutex_destroy(&LOCK_sync);
568 mysql_mutex_destroy(&LOCK_active);
569 mysql_mutex_destroy(&LOCK_pool);
570@@ -1063,7 +1076,7 @@
571 case 5:
572 data[0]='A'; // garble the first (signature) byte, in case mysql_file_delete fails
573 case 4:
574-@@ -6596,42 +6875,87 @@
575+@@ -6656,42 +6938,87 @@
576 mysql_cond_destroy(&COND_prep_xids);
577 }
578
579@@ -1163,7 +1176,7 @@
580 }
581
582 int TC_LOG_BINLOG::recover(IO_CACHE *log, Format_description_log_event *fdle)
583-@@ -6700,9 +7024,67 @@
584+@@ -6760,9 +7087,67 @@
585 {
586 return (ulonglong) mysql_bin_log.get_log_file()->pos_in_file;
587 }
588@@ -1231,7 +1244,7 @@
589 struct st_mysql_storage_engine binlog_storage_engine=
590 { MYSQL_HANDLERTON_INTERFACE_VERSION };
591
592-@@ -6717,7 +7099,7 @@
593+@@ -6777,7 +7162,7 @@
594 binlog_init, /* Plugin Init */
595 NULL, /* Plugin Deinit */
596 0x0100 /* 1.0 */,
597@@ -1423,7 +1436,7 @@
598 void set_write_error(THD *thd, bool is_transactional);
599 bool check_write_error(THD *thd);
600
601-@@ -507,6 +595,7 @@
602+@@ -509,6 +597,7 @@
603 inline void unlock_index() { mysql_mutex_unlock(&LOCK_index);}
604 inline IO_CACHE *get_index_file() { return &index_file;}
605 inline uint32 get_open_count() { return open_count; }
606@@ -1521,7 +1534,7 @@
607 key_thread_handle_manager, key_thread_kill_server, key_thread_main,
608 --- a/sql/sql_class.cc
609 +++ b/sql/sql_class.cc
610-@@ -912,6 +912,8 @@
611+@@ -1005,6 +1005,8 @@
612 mysql_mutex_init(key_LOCK_thd_data, &LOCK_thd_data, MY_MUTEX_INIT_FAST);
613 mysql_mutex_init(key_LOCK_temporary_tables, &LOCK_temporary_tables,
614 MY_MUTEX_INIT_FAST);
615@@ -1530,7 +1543,7 @@
616
617 /* Variables with default values */
618 proc_info="login";
619-@@ -1516,6 +1518,8 @@
620+@@ -1609,6 +1611,8 @@
621 my_free(db);
622 db= NULL;
623 free_root(&transaction.mem_root,MYF(0));
624@@ -1539,7 +1552,7 @@
625 mysql_mutex_destroy(&LOCK_thd_data);
626 mysql_mutex_destroy(&LOCK_temporary_tables);
627 #ifndef DBUG_OFF
628-@@ -5199,6 +5203,24 @@
629+@@ -5292,6 +5296,24 @@
630 DBUG_RETURN(0);
631 }
632
633@@ -1566,7 +1579,7 @@
634 {
635 --- a/sql/sql_class.h
636 +++ b/sql/sql_class.h
637-@@ -3017,6 +3017,14 @@
638+@@ -3078,6 +3078,14 @@
639 LEX_STRING get_invoker_user() { return invoker_user; }
640 LEX_STRING get_invoker_host() { return invoker_host; }
641 bool has_invoker() { return invoker_user.length > 0; }
642@@ -1581,7 +1594,7 @@
643 private:
644
645 /** The current internal error handler for this thread, or NULL. */
646-@@ -3059,6 +3067,16 @@
647+@@ -3120,6 +3128,16 @@
648 */
649 LEX_STRING invoker_user;
650 LEX_STRING invoker_host;
651@@ -1874,7 +1887,7 @@
652
653 trx_deregister_from_2pc(trx);
654
655-@@ -10973,6 +11140,7 @@
656+@@ -10982,6 +11149,7 @@
657
658 srv_active_wake_master_thread();
659
660@@ -1882,7 +1895,7 @@
661 if (thd_sql_command(thd) != SQLCOM_XA_PREPARE
662 && (all
663 || !thd_test_options(
664-@@ -10999,6 +11167,7 @@
665+@@ -11008,6 +11176,7 @@
666 mysql_mutex_lock(&prepare_commit_mutex);
667 trx_owns_prepare_commit_mutex_set(trx);
668 }
669
670=== modified file 'patches/innodb_adaptive_hash_index_partitions.patch'
671--- patches/innodb_adaptive_hash_index_partitions.patch 2011-12-13 05:54:15 +0000
672+++ patches/innodb_adaptive_hash_index_partitions.patch 2011-12-29 02:23:24 +0000
673@@ -81,7 +81,7 @@
674
675 --- a/storage/innobase/btr/btr0cur.c
676 +++ b/storage/innobase/btr/btr0cur.c
677-@@ -502,7 +502,7 @@
678+@@ -500,7 +500,7 @@
679 #ifdef UNIV_SEARCH_PERF_STAT
680 info->n_searches++;
681 #endif
682@@ -90,7 +90,7 @@
683 && latch_mode <= BTR_MODIFY_LEAF
684 && info->last_hash_succ
685 && !estimate
686-@@ -538,7 +538,7 @@
687+@@ -536,7 +536,7 @@
688
689 if (has_search_latch) {
690 /* Release possible search latch to obey latching order */
691@@ -99,7 +99,7 @@
692 }
693
694 /* Store the position of the tree latch we push to mtr so that we
695-@@ -862,7 +862,7 @@
696+@@ -847,7 +847,7 @@
697
698 if (has_search_latch) {
699
700@@ -108,7 +108,7 @@
701 }
702 }
703
704-@@ -1992,13 +1992,13 @@
705+@@ -1977,13 +1977,13 @@
706 btr_search_update_hash_on_delete(cursor);
707 }
708
709@@ -946,7 +946,7 @@
710 }
711 --- a/storage/innobase/buf/buf0buf.c
712 +++ b/storage/innobase/buf/buf0buf.c
713-@@ -950,6 +950,7 @@
714+@@ -960,6 +960,7 @@
715
716 block->check_index_page_at_flush = FALSE;
717 block->index = NULL;
718@@ -954,7 +954,7 @@
719
720 #ifdef UNIV_DEBUG
721 block->page.in_page_hash = FALSE;
722-@@ -1392,7 +1393,11 @@
723+@@ -1427,7 +1428,11 @@
724 ulint p;
725
726 #ifdef UNIV_SYNC_DEBUG
727@@ -967,7 +967,7 @@
728 #endif /* UNIV_SYNC_DEBUG */
729 ut_ad(!btr_search_enabled);
730
731-@@ -2107,6 +2112,7 @@
732+@@ -2142,6 +2147,7 @@
733 {
734 block->check_index_page_at_flush = FALSE;
735 block->index = NULL;
736@@ -1029,7 +1029,7 @@
737 }
738 --- a/storage/innobase/handler/ha_innodb.cc
739 +++ b/storage/innobase/handler/ha_innodb.cc
740-@@ -11824,6 +11824,11 @@
741+@@ -11833,6 +11833,11 @@
742 "Disable with --skip-innodb-adaptive-hash-index.",
743 NULL, innodb_adaptive_hash_index_update, TRUE);
744
745@@ -1041,7 +1041,7 @@
746 static MYSQL_SYSVAR_ULONG(replication_delay, srv_replication_delay,
747 PLUGIN_VAR_RQCMDARG,
748 "Replication thread delay (ms) on the slave server if "
749-@@ -12204,6 +12209,7 @@
750+@@ -12213,6 +12218,7 @@
751 MYSQL_SYSVAR(use_sys_stats_table),
752 MYSQL_SYSVAR(stats_sample_pages),
753 MYSQL_SYSVAR(adaptive_hash_index),
754
755=== modified file 'patches/innodb_admin_command_base.patch'
756--- patches/innodb_admin_command_base.patch 2011-12-13 15:06:50 +0000
757+++ patches/innodb_admin_command_base.patch 2011-12-29 02:23:24 +0000
758@@ -7,7 +7,7 @@
759 # should be done or reviewed by the maintainer!
760 --- a/storage/innobase/handler/ha_innodb.cc
761 +++ b/storage/innobase/handler/ha_innodb.cc
762-@@ -11990,7 +11990,8 @@
763+@@ -11999,7 +11999,8 @@
764 i_s_innodb_sys_foreign_cols,
765 i_s_innodb_sys_stats,
766 i_s_innodb_table_stats,
767@@ -186,7 +186,7 @@
768 +select * from information_schema.XTRADB_ADMIN_COMMAND /*!XTRA_HELLO*/;
769 --- a/mysql-test/r/mysqld--help-notwin.result
770 +++ b/mysql-test/r/mysqld--help-notwin.result
771-@@ -731,6 +731,10 @@
772+@@ -733,6 +733,10 @@
773 -V, --version Output version information and exit.
774 --wait-timeout=# The number of seconds the server waits for activity on a
775 connection before closing it
776@@ -197,7 +197,7 @@
777
778 Variables (--variable-name=value)
779 abort-slave-event-count 0
780-@@ -955,6 +959,7 @@
781+@@ -958,6 +962,7 @@
782 updatable-views-with-limit YES
783 verbose TRUE
784 wait-timeout 28800
785
786=== modified file 'patches/innodb_buffer_pool_pages_i_s.patch'
787--- patches/innodb_buffer_pool_pages_i_s.patch 2011-12-16 09:37:26 +0000
788+++ patches/innodb_buffer_pool_pages_i_s.patch 2011-12-29 02:23:24 +0000
789@@ -7,7 +7,7 @@
790 # should be done or reviewed by the maintainer!
791 --- a/storage/innobase/buf/buf0buf.c
792 +++ b/storage/innobase/buf/buf0buf.c
793-@@ -4126,6 +4126,36 @@
794+@@ -4161,6 +4161,36 @@
795 mutex_exit(block_mutex);
796 }
797
798@@ -46,7 +46,7 @@
799 @return TRUE */
800 --- a/storage/innobase/handler/ha_innodb.cc
801 +++ b/storage/innobase/handler/ha_innodb.cc
802-@@ -12287,6 +12287,9 @@
803+@@ -12296,6 +12296,9 @@
804 i_s_innodb_sys_stats,
805 i_s_innodb_table_stats,
806 i_s_innodb_index_stats,
807
808=== modified file 'patches/innodb_buffer_pool_shm.patch'
809--- patches/innodb_buffer_pool_shm.patch 2011-12-08 07:27:43 +0000
810+++ patches/innodb_buffer_pool_shm.patch 2011-12-29 02:23:24 +0000
811@@ -7,7 +7,7 @@
812 # should be done or reviewed by the maintainer!
813 --- a/storage/innobase/buf/buf0buf.c
814 +++ b/storage/innobase/buf/buf0buf.c
815-@@ -1005,10 +1005,12 @@
816+@@ -1022,10 +1022,12 @@
817 buf_block_t* block;
818 byte* frame;
819 ulint i;
820@@ -20,7 +20,7 @@
821 /* Reserve space for the block descriptors. */
822 mem_size += ut_2pow_round((mem_size / UNIV_PAGE_SIZE) * (sizeof *block)
823 + (UNIV_PAGE_SIZE - 1), UNIV_PAGE_SIZE);
824-@@ -1046,6 +1048,10 @@
825+@@ -1063,6 +1065,10 @@
826 chunk->size = size;
827 }
828
829@@ -55,7 +55,7 @@
830 srv_mem_pool_size = (ulint) innobase_additional_mem_pool_size;
831
832 srv_n_file_io_threads = (ulint) innobase_file_io_threads;
833-@@ -11855,6 +11863,16 @@
834+@@ -11864,6 +11872,16 @@
835 "Number of buffer pool instances, set to higher value on high-end machines to increase scalability",
836 NULL, NULL, 1L, 1L, MAX_BUFFER_POOLS, 1L);
837
838@@ -72,7 +72,7 @@
839 static MYSQL_SYSVAR_ULONG(commit_concurrency, innobase_commit_concurrency,
840 PLUGIN_VAR_RQCMDARG,
841 "Helps in performance tuning in heavily concurrent environments.",
842-@@ -12161,6 +12179,8 @@
843+@@ -12170,6 +12188,8 @@
844 MYSQL_SYSVAR(autoextend_increment),
845 MYSQL_SYSVAR(buffer_pool_size),
846 MYSQL_SYSVAR(buffer_pool_instances),
847
848=== modified file 'patches/innodb_dict_size_limit.patch'
849--- patches/innodb_dict_size_limit.patch 2011-12-08 08:05:30 +0000
850+++ patches/innodb_dict_size_limit.patch 2011-12-29 02:23:24 +0000
851@@ -377,7 +377,7 @@
852 {"have_atomic_builtins",
853 (char*) &export_vars.innodb_have_atomic_builtins, SHOW_BOOL},
854 {"log_waits",
855-@@ -11765,6 +11767,11 @@
856+@@ -11774,6 +11776,11 @@
857 "Choose method of innodb_adaptive_flushing. (native, [estimate], keep_average)",
858 NULL, innodb_adaptive_flushing_method_update, 1, &adaptive_flushing_method_typelib);
859
860@@ -389,7 +389,7 @@
861 static struct st_mysql_sys_var* innobase_system_variables[]= {
862 MYSQL_SYSVAR(additional_mem_pool_size),
863 MYSQL_SYSVAR(autoextend_increment),
864-@@ -11834,6 +11841,7 @@
865+@@ -11843,6 +11850,7 @@
866 MYSQL_SYSVAR(flush_neighbor_pages),
867 MYSQL_SYSVAR(read_ahead),
868 MYSQL_SYSVAR(adaptive_flushing_method),
869@@ -399,7 +399,7 @@
870 MYSQL_SYSVAR(change_buffering),
871 --- a/storage/innobase/ibuf/ibuf0ibuf.c
872 +++ b/storage/innobase/ibuf/ibuf0ibuf.c
873-@@ -566,6 +566,7 @@
874+@@ -575,6 +575,7 @@
875
876 /* Use old-style record format for the insert buffer. */
877 table = dict_mem_table_create(IBUF_TABLE_NAME, IBUF_SPACE_ID, 1, 0);
878
879=== modified file 'patches/innodb_expand_fast_index_creation.patch'
880--- patches/innodb_expand_fast_index_creation.patch 2011-12-13 13:49:04 +0000
881+++ patches/innodb_expand_fast_index_creation.patch 2011-12-29 02:23:24 +0000
882@@ -953,7 +953,7 @@
883 key_info++;
884 }
885 if (!unique_key && !primary_key &&
886-@@ -5256,6 +5280,10 @@
887+@@ -5261,6 +5285,10 @@
888 List<Create_field> new_create_list;
889 /* New key definitions are added here */
890 List<Key> new_key_list;
891@@ -964,7 +964,7 @@
892 List_iterator<Alter_drop> drop_it(alter_info->drop_list);
893 List_iterator<Create_field> def_it(alter_info->create_list);
894 List_iterator<Alter_column> alter_it(alter_info->alter_list);
895-@@ -5268,6 +5296,7 @@
896+@@ -5273,6 +5301,7 @@
897 uint used_fields= create_info->used_fields;
898 KEY *key_info=table->key_info;
899 bool rc= TRUE;
900@@ -972,7 +972,7 @@
901
902 DBUG_ENTER("mysql_prepare_alter_table");
903
904-@@ -5457,7 +5486,26 @@
905+@@ -5462,7 +5491,26 @@
906 /*
907 Collect all keys which isn't in drop list. Add only those
908 for which some fields exists.
909@@ -1000,7 +1000,7 @@
910
911 for (uint i=0 ; i < table->s->keys ; i++,key_info++)
912 {
913-@@ -5574,6 +5622,8 @@
914+@@ -5579,6 +5627,8 @@
915 test(key_info->flags & HA_GENERATED_KEY),
916 key_parts);
917 new_key_list.push_back(key);
918@@ -1009,7 +1009,7 @@
919 }
920 }
921 {
922-@@ -5581,7 +5631,21 @@
923+@@ -5586,7 +5636,21 @@
924 while ((key=key_it++)) // Add new keys
925 {
926 if (key->type != Key::FOREIGN_KEY)
927@@ -1031,7 +1031,7 @@
928 if (key->name.str &&
929 !my_strcasecmp(system_charset_info, key->name.str, primary_key_name))
930 {
931-@@ -5630,12 +5694,104 @@
932+@@ -5635,12 +5699,104 @@
933 rc= FALSE;
934 alter_info->create_list.swap(new_create_list);
935 alter_info->key_list.swap(new_key_list);
936@@ -1136,7 +1136,7 @@
937 Alter table
938
939 SYNOPSIS
940-@@ -6428,19 +6584,38 @@
941+@@ -6434,19 +6590,38 @@
942 */
943 if (new_table && !(new_table->file->ha_table_flags() & HA_NO_COPY_ON_ALTER))
944 {
945@@ -1312,7 +1312,7 @@
946
947 --- a/sql/sql_class.h
948 +++ b/sql/sql_class.h
949-@@ -556,6 +556,7 @@
950+@@ -551,6 +551,7 @@
951
952 double long_query_time_double;
953
954@@ -1404,7 +1404,7 @@
955 --expire-logs-days=#
956 If non-zero, binary logs will be purged after
957 expire_logs_days days; possible purges happen at startup
958-@@ -821,6 +825,7 @@
959+@@ -823,6 +827,7 @@
960 div-precision-increment 4
961 engine-condition-pushdown TRUE
962 event-scheduler OFF
963@@ -1425,7 +1425,7 @@
964 --expire-logs-days=#
965 If non-zero, binary logs will be purged after
966 expire_logs_days days; possible purges happen at startup
967-@@ -775,6 +779,7 @@
968+@@ -777,6 +781,7 @@
969 div-precision-increment 4
970 engine-condition-pushdown TRUE
971 event-scheduler OFF
972
973=== modified file 'patches/innodb_expand_import.patch'
974--- patches/innodb_expand_import.patch 2011-12-16 09:37:26 +0000
975+++ patches/innodb_expand_import.patch 2011-12-29 02:23:24 +0000
976@@ -884,7 +884,7 @@
977 #endif /* !UNIV_HOTBACKUP */
978 --- a/storage/innobase/handler/ha_innodb.cc
979 +++ b/storage/innobase/handler/ha_innodb.cc
980-@@ -7423,6 +7423,14 @@
981+@@ -7422,6 +7422,14 @@
982 err = row_discard_tablespace_for_mysql(dict_table->name, trx);
983 } else {
984 err = row_import_tablespace_for_mysql(dict_table->name, trx);
985@@ -899,7 +899,7 @@
986 }
987
988 err = convert_error_code_to_mysql(err, dict_table->flags, NULL);
989-@@ -11772,6 +11780,11 @@
990+@@ -11781,6 +11789,11 @@
991 "Choose method of innodb_adaptive_flushing. (native, [estimate], keep_average)",
992 NULL, innodb_adaptive_flushing_method_update, 1, &adaptive_flushing_method_typelib);
993
994@@ -911,7 +911,7 @@
995 static MYSQL_SYSVAR_ULONG(dict_size_limit, srv_dict_size_limit,
996 PLUGIN_VAR_RQCMDARG,
997 "Limit the allocated memory for dictionary cache. (0: unlimited)",
998-@@ -11846,6 +11859,7 @@
999+@@ -11855,6 +11868,7 @@
1000 MYSQL_SYSVAR(flush_neighbor_pages),
1001 MYSQL_SYSVAR(read_ahead),
1002 MYSQL_SYSVAR(adaptive_flushing_method),
1003
1004=== modified file 'patches/innodb_extend_slow.patch'
1005--- patches/innodb_extend_slow.patch 2011-12-06 03:39:36 +0000
1006+++ patches/innodb_extend_slow.patch 2011-12-29 02:23:24 +0000
1007@@ -48,7 +48,7 @@
1008
1009 /*
1010 IMPLEMENTATION OF THE BUFFER POOL
1011-@@ -1834,8 +1868,16 @@
1012+@@ -1869,8 +1903,16 @@
1013 mutex_t* block_mutex;
1014 ibool must_read;
1015 unsigned access_time;
1016@@ -65,7 +65,7 @@
1017 buf_pool->stat.n_page_gets++;
1018
1019 for (;;) {
1020-@@ -1853,7 +1895,7 @@
1021+@@ -1888,7 +1930,7 @@
1022 //buf_pool_mutex_exit(buf_pool);
1023 rw_lock_s_unlock(&buf_pool->page_hash_latch);
1024
1025@@ -74,7 +74,7 @@
1026
1027 #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
1028 ut_a(++buf_dbg_counter % 37 || buf_validate());
1029-@@ -1949,6 +1991,13 @@
1030+@@ -1984,6 +2026,13 @@
1031 /* Let us wait until the read operation
1032 completes */
1033
1034@@ -88,7 +88,7 @@
1035 for (;;) {
1036 enum buf_io_fix io_fix;
1037
1038-@@ -1963,6 +2012,12 @@
1039+@@ -1998,6 +2047,12 @@
1040 break;
1041 }
1042 }
1043@@ -101,7 +101,7 @@
1044 }
1045
1046 #ifdef UNIV_IBUF_COUNT_DEBUG
1047-@@ -2277,6 +2332,11 @@
1048+@@ -2312,6 +2367,11 @@
1049 ibool must_read;
1050 ulint retries = 0;
1051 mutex_t* block_mutex = NULL;
1052@@ -113,7 +113,7 @@
1053 buf_pool_t* buf_pool = buf_pool_get(space, offset);
1054
1055 ut_ad(mtr);
1056-@@ -2306,6 +2366,9 @@
1057+@@ -2341,6 +2401,9 @@
1058 || ibuf_page_low(space, zip_size, offset,
1059 FALSE, file, line, NULL));
1060 #endif
1061@@ -123,7 +123,7 @@
1062 buf_pool->stat.n_page_gets++;
1063 fold = buf_page_address_fold(space, offset);
1064 loop:
1065-@@ -2376,9 +2439,9 @@
1066+@@ -2411,9 +2474,9 @@
1067 return(NULL);
1068 }
1069
1070@@ -135,7 +135,7 @@
1071
1072 retries = 0;
1073 } else if (retries < BUF_PAGE_READ_MAX_RETRIES) {
1074-@@ -2688,6 +2751,13 @@
1075+@@ -2723,6 +2786,13 @@
1076 /* Let us wait until the read operation
1077 completes */
1078
1079@@ -149,7 +149,7 @@
1080 for (;;) {
1081 enum buf_io_fix io_fix;
1082
1083-@@ -2702,6 +2772,12 @@
1084+@@ -2737,6 +2807,12 @@
1085 break;
1086 }
1087 }
1088@@ -162,7 +162,7 @@
1089 }
1090
1091 fix_type = MTR_MEMO_BUF_FIX;
1092-@@ -2728,13 +2804,17 @@
1093+@@ -2763,13 +2839,17 @@
1094 read-ahead */
1095
1096 buf_read_ahead_linear(space, zip_size, offset,
1097@@ -181,7 +181,7 @@
1098 return(block);
1099 }
1100
1101-@@ -2758,6 +2838,7 @@
1102+@@ -2793,6 +2873,7 @@
1103 unsigned access_time;
1104 ibool success;
1105 ulint fix_type;
1106@@ -189,7 +189,7 @@
1107
1108 ut_ad(block);
1109 ut_ad(mtr);
1110-@@ -2835,6 +2916,10 @@
1111+@@ -2870,6 +2951,10 @@
1112 #if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
1113 ut_a(block->page.file_page_was_freed == FALSE);
1114 #endif
1115@@ -200,7 +200,7 @@
1116 if (UNIV_UNLIKELY(!access_time)) {
1117 /* In the case of a first access, try to apply linear
1118 read-ahead */
1119-@@ -2842,7 +2927,7 @@
1120+@@ -2877,7 +2962,7 @@
1121 buf_read_ahead_linear(buf_block_get_space(block),
1122 buf_block_get_zip_size(block),
1123 buf_block_get_page_no(block),
1124@@ -209,7 +209,7 @@
1125 }
1126
1127 #ifdef UNIV_IBUF_COUNT_DEBUG
1128-@@ -2852,6 +2937,9 @@
1129+@@ -2887,6 +2972,9 @@
1130 buf_pool = buf_pool_from_block(block);
1131 buf_pool->stat.n_page_gets++;
1132
1133@@ -219,7 +219,7 @@
1134 return(TRUE);
1135 }
1136
1137-@@ -2874,6 +2962,7 @@
1138+@@ -2909,6 +2997,7 @@
1139 buf_pool_t* buf_pool;
1140 ibool success;
1141 ulint fix_type;
1142@@ -227,7 +227,7 @@
1143
1144 ut_ad(mtr);
1145 ut_ad(mtr->state == MTR_ACTIVE);
1146-@@ -2960,6 +3049,11 @@
1147+@@ -2995,6 +3084,11 @@
1148 #endif
1149 buf_pool->stat.n_page_gets++;
1150
1151@@ -355,7 +355,7 @@
1152
1153 --- a/storage/innobase/fil/fil0fil.c
1154 +++ b/storage/innobase/fil/fil0fil.c
1155-@@ -4748,7 +4748,7 @@
1156+@@ -4757,7 +4757,7 @@
1157 node->name, node->handle, buf,
1158 offset_low, offset_high,
1159 page_size * n_pages,
1160@@ -364,7 +364,7 @@
1161 #endif
1162 if (success) {
1163 node->size += n_pages;
1164-@@ -5075,7 +5075,7 @@
1165+@@ -5084,7 +5084,7 @@
1166 i/o on a tablespace which does not exist */
1167 UNIV_INTERN
1168 ulint
1169@@ -373,7 +373,7 @@
1170 /*===*/
1171 ulint type, /*!< in: OS_FILE_READ or OS_FILE_WRITE,
1172 ORed to OS_FILE_LOG, if a log i/o
1173-@@ -5100,8 +5100,9 @@
1174+@@ -5109,8 +5109,9 @@
1175 void* buf, /*!< in/out: buffer where to store read data
1176 or from where to write; in aio this must be
1177 appropriately aligned */
1178@@ -384,7 +384,7 @@
1179 {
1180 ulint mode;
1181 fil_space_t* space;
1182-@@ -5269,7 +5270,7 @@
1183+@@ -5278,7 +5279,7 @@
1184 #else
1185 /* Queue the aio request */
1186 ret = os_aio(type, mode | wake_later, node->name, node->handle, buf,
1187@@ -445,7 +445,7 @@
1188 /*********************************************************************//**
1189 Note that a transaction has been registered with MySQL.
1190 @return true if transaction is registered with MySQL 2PC coordinator */
1191-@@ -9409,6 +9445,25 @@
1192+@@ -9418,6 +9454,25 @@
1193 statement has ended */
1194
1195 if (trx->n_mysql_tables_in_use == 0) {
1196@@ -514,7 +514,7 @@
1197 order to contract the insert buffer tree. Technically, this function is like
1198 --- a/storage/innobase/include/fil0fil.h
1199 +++ b/storage/innobase/include/fil0fil.h
1200-@@ -611,9 +611,12 @@
1201+@@ -615,9 +615,12 @@
1202 Reads or writes data. This operation is asynchronous (aio).
1203 @return DB_SUCCESS, or DB_TABLESPACE_DELETED if we are trying to do
1204 i/o on a tablespace which does not exist */
1205@@ -528,7 +528,7 @@
1206 /*===*/
1207 ulint type, /*!< in: OS_FILE_READ or OS_FILE_WRITE,
1208 ORed to OS_FILE_LOG, if a log i/o
1209-@@ -638,8 +641,9 @@
1210+@@ -642,8 +645,9 @@
1211 void* buf, /*!< in/out: buffer where to store read data
1212 or from where to write; in aio this must be
1213 appropriately aligned */
1214
1215=== modified file 'patches/innodb_extra_rseg.patch'
1216--- patches/innodb_extra_rseg.patch 2011-12-13 15:06:50 +0000
1217+++ patches/innodb_extra_rseg.patch 2011-12-29 02:23:24 +0000
1218@@ -7,7 +7,7 @@
1219 # should be done or reviewed by the maintainer!
1220 --- a/storage/innobase/handler/ha_innodb.cc
1221 +++ b/storage/innobase/handler/ha_innodb.cc
1222-@@ -11655,6 +11655,7 @@
1223+@@ -11664,6 +11664,7 @@
1224 NULL, /* reserved */
1225 0, /* flags */
1226 },
1227
1228=== modified file 'patches/innodb_fake_changes.patch'
1229--- patches/innodb_fake_changes.patch 2011-12-08 07:27:43 +0000
1230+++ patches/innodb_fake_changes.patch 2011-12-29 02:23:24 +0000
1231@@ -7,7 +7,7 @@
1232 # should be done or reviewed by the maintainer!
1233 --- a/storage/innobase/btr/btr0cur.c
1234 +++ b/storage/innobase/btr/btr0cur.c
1235-@@ -1173,6 +1173,11 @@
1236+@@ -1158,6 +1158,11 @@
1237 rec_t* rec;
1238 roll_ptr_t roll_ptr;
1239
1240@@ -19,7 +19,7 @@
1241 /* Check if we have to wait for a lock: enqueue an explicit lock
1242 request if yes */
1243
1244-@@ -1304,7 +1309,7 @@
1245+@@ -1289,7 +1294,7 @@
1246 }
1247 #endif /* UNIV_DEBUG */
1248
1249@@ -28,7 +28,7 @@
1250 max_size = page_get_max_insert_size_after_reorganize(page, 1);
1251 leaf = page_is_leaf(page);
1252
1253-@@ -1399,6 +1404,12 @@
1254+@@ -1384,6 +1389,12 @@
1255 goto fail_err;
1256 }
1257
1258@@ -41,7 +41,7 @@
1259 page_cursor = btr_cur_get_page_cur(cursor);
1260
1261 /* Now, try the insert */
1262-@@ -1541,10 +1552,10 @@
1263+@@ -1526,10 +1537,10 @@
1264
1265 *big_rec = NULL;
1266
1267@@ -54,7 +54,7 @@
1268 MTR_MEMO_PAGE_X_FIX));
1269
1270 /* Try first an optimistic insert; reset the cursor flag: we do not
1271-@@ -1610,6 +1621,16 @@
1272+@@ -1595,6 +1606,16 @@
1273 }
1274 }
1275
1276@@ -71,7 +71,7 @@
1277 if (dict_index_get_page(index)
1278 == buf_block_get_page_no(btr_cur_get_block(cursor))) {
1279
1280-@@ -1666,6 +1687,11 @@
1281+@@ -1651,6 +1672,11 @@
1282
1283 ut_ad(cursor && update && thr && roll_ptr);
1284
1285@@ -83,7 +83,7 @@
1286 rec = btr_cur_get_rec(cursor);
1287 index = cursor->index;
1288
1289-@@ -1965,6 +1991,14 @@
1290+@@ -1950,6 +1976,14 @@
1291 return(err);
1292 }
1293
1294@@ -98,7 +98,7 @@
1295 if (!(flags & BTR_KEEP_SYS_FLAG)) {
1296 row_upd_rec_sys_fields(rec, NULL,
1297 index, offsets, trx, roll_ptr);
1298-@@ -2074,7 +2108,7 @@
1299+@@ -2059,7 +2093,7 @@
1300 rec = btr_cur_get_rec(cursor);
1301 index = cursor->index;
1302 ut_ad(!!page_rec_is_comp(rec) == dict_table_is_comp(index->table));
1303@@ -107,7 +107,7 @@
1304 /* The insert buffer tree should never be updated in place. */
1305 ut_ad(!dict_index_is_ibuf(index));
1306
1307-@@ -2187,6 +2221,11 @@
1308+@@ -2172,6 +2206,11 @@
1309 goto err_exit;
1310 }
1311
1312@@ -119,7 +119,7 @@
1313 /* Ok, we may do the replacement. Store on the page infimum the
1314 explicit locks on rec, before deleting rec (see the comment in
1315 btr_cur_pessimistic_update). */
1316-@@ -2337,9 +2376,9 @@
1317+@@ -2322,9 +2361,9 @@
1318 rec = btr_cur_get_rec(cursor);
1319 index = cursor->index;
1320
1321@@ -131,7 +131,7 @@
1322 #ifdef UNIV_ZIP_DEBUG
1323 ut_a(!page_zip || page_zip_validate(page_zip, page));
1324 #endif /* UNIV_ZIP_DEBUG */
1325-@@ -2427,6 +2466,9 @@
1326+@@ -2412,6 +2451,9 @@
1327
1328 ut_ad(big_rec_vec == NULL);
1329
1330@@ -141,7 +141,7 @@
1331 btr_rec_free_updated_extern_fields(
1332 index, rec, page_zip, offsets, update,
1333 trx_is_recv(trx) ? RB_RECOVERY : RB_NORMAL, mtr);
1334-@@ -2461,6 +2503,12 @@
1335+@@ -2446,6 +2488,12 @@
1336 }
1337 }
1338
1339@@ -154,7 +154,7 @@
1340 /* Store state of explicit locks on rec on the page infimum record,
1341 before deleting rec. The page infimum acts as a dummy carrier of the
1342 locks, taking care also of lock releases, before we can move the locks
1343-@@ -2763,6 +2811,11 @@
1344+@@ -2748,6 +2796,11 @@
1345 ut_ad(dict_index_is_clust(index));
1346 ut_ad(!rec_get_deleted_flag(rec, rec_offs_comp(offsets)));
1347
1348@@ -166,7 +166,7 @@
1349 err = lock_clust_rec_modify_check_and_lock(flags, block,
1350 rec, index, offsets, thr);
1351
1352-@@ -2897,6 +2950,11 @@
1353+@@ -2882,6 +2935,11 @@
1354 rec_t* rec;
1355 ulint err;
1356
1357@@ -214,7 +214,7 @@
1358 /* Transaction is deregistered only in a commit or a rollback. If
1359 it is deregistered we know there cannot be resources to be freed
1360 and we could return immediately. For the time being, we play safe
1361-@@ -7545,6 +7558,12 @@
1362+@@ -7544,6 +7557,12 @@
1363
1364 trx = innobase_trx_allocate(thd);
1365
1366@@ -227,7 +227,7 @@
1367 /* Latch the InnoDB data dictionary exclusively so that no deadlocks
1368 or lock waits can happen in it during a table create operation.
1369 Drop table etc. do this latching in row0mysql.c. */
1370-@@ -7765,6 +7784,10 @@
1371+@@ -7764,6 +7783,10 @@
1372 DBUG_RETURN(HA_ERR_CRASHED);
1373 }
1374
1375@@ -238,7 +238,7 @@
1376 /* Truncate the table in InnoDB */
1377
1378 error = row_truncate_table_for_mysql(prebuilt->table, prebuilt->trx);
1379-@@ -7821,6 +7844,12 @@
1380+@@ -7820,6 +7843,12 @@
1381
1382 trx = innobase_trx_allocate(thd);
1383
1384@@ -251,7 +251,7 @@
1385 name_len = strlen(name);
1386
1387 ut_a(name_len < 1000);
1388-@@ -7907,6 +7936,12 @@
1389+@@ -7906,6 +7935,12 @@
1390 trx->mysql_thd = NULL;
1391 #else
1392 trx = innobase_trx_allocate(thd);
1393@@ -264,7 +264,7 @@
1394 #endif
1395 row_drop_database_for_mysql(namebuf, trx);
1396 my_free(namebuf);
1397-@@ -8012,6 +8047,11 @@
1398+@@ -8011,6 +8046,11 @@
1399 trx_search_latch_release_if_reserved(parent_trx);
1400
1401 trx = innobase_trx_allocate(thd);
1402@@ -276,7 +276,7 @@
1403
1404 error = innobase_rename_table(trx, from, to, TRUE);
1405
1406-@@ -10872,6 +10912,10 @@
1407+@@ -10881,6 +10921,10 @@
1408 return(0);
1409 }
1410
1411@@ -287,7 +287,7 @@
1412 thd_get_xid(thd, (MYSQL_XID*) &trx->xid);
1413
1414 /* Release a possible FIFO ticket and search latch. Since we will
1415-@@ -12429,6 +12473,7 @@
1416+@@ -12438,6 +12482,7 @@
1417 MYSQL_SYSVAR(rollback_segments),
1418 MYSQL_SYSVAR(corrupt_table_action),
1419 MYSQL_SYSVAR(lazy_drop_table),
1420@@ -348,7 +348,7 @@
1421 /* Flag this transaction as a dictionary operation, so that
1422 --- a/storage/innobase/ibuf/ibuf0ibuf.c
1423 +++ b/storage/innobase/ibuf/ibuf0ibuf.c
1424-@@ -3496,6 +3496,8 @@
1425+@@ -3424,6 +3424,8 @@
1426
1427 ut_a(trx_sys_multiple_tablespace_format);
1428
1429
1430=== modified file 'patches/innodb_fast_checksum.patch'
1431--- patches/innodb_fast_checksum.patch 2011-12-08 08:23:02 +0000
1432+++ patches/innodb_fast_checksum.patch 2011-12-29 02:23:24 +0000
1433@@ -161,7 +161,7 @@
1434
1435 srv_blocking_lru_restore = (ibool) innobase_blocking_lru_restore;
1436
1437-@@ -11533,6 +11535,15 @@
1438+@@ -11542,6 +11544,15 @@
1439 "Disable with --skip-innodb-checksums.",
1440 NULL, NULL, TRUE);
1441
1442@@ -177,7 +177,7 @@
1443 static MYSQL_SYSVAR_STR(data_home_dir, innobase_data_home_dir,
1444 PLUGIN_VAR_READONLY,
1445 "The common part for InnoDB table spaces.",
1446-@@ -12064,6 +12075,7 @@
1447+@@ -12073,6 +12084,7 @@
1448 MYSQL_SYSVAR(buffer_pool_size),
1449 MYSQL_SYSVAR(buffer_pool_instances),
1450 MYSQL_SYSVAR(checksums),
1451@@ -201,7 +201,7 @@
1452 looked at the first few bytes of the page. This calculates that old
1453 --- a/storage/innobase/include/fil0fil.h
1454 +++ b/storage/innobase/include/fil0fil.h
1455-@@ -118,6 +118,7 @@
1456+@@ -119,6 +119,7 @@
1457 #define FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID 34 /*!< starting from 4.1.x this
1458 contains the space id of the page */
1459 #define FIL_PAGE_DATA 38 /*!< start of the data on the page */
1460
1461=== modified file 'patches/innodb_files_extend.patch'
1462--- patches/innodb_files_extend.patch 2011-12-06 03:39:36 +0000
1463+++ patches/innodb_files_extend.patch 2011-12-29 02:23:24 +0000
1464@@ -16,7 +16,7 @@
1465 fprintf(stderr,
1466 "InnoDB: Error: the size of single-table"
1467 " tablespace file %s\n"
1468-@@ -4152,7 +4152,7 @@
1469+@@ -4161,7 +4161,7 @@
1470
1471 size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low;
1472 #ifndef UNIV_HOTBACKUP
1473@@ -25,7 +25,7 @@
1474 fprintf(stderr,
1475 "InnoDB: Error: the size of single-table tablespace"
1476 " file %s\n"
1477-@@ -4172,7 +4172,7 @@
1478+@@ -4181,7 +4181,7 @@
1479 /* Align the memory for file i/o if we might have O_DIRECT set */
1480 page = ut_align(buf2, UNIV_PAGE_SIZE);
1481
1482@@ -34,7 +34,7 @@
1483 success = os_file_read(file, page, 0, 0, UNIV_PAGE_SIZE);
1484
1485 /* We have to read the tablespace id from the file */
1486-@@ -5150,9 +5150,9 @@
1487+@@ -5159,9 +5159,9 @@
1488 ut_ad(ut_is_2pow(zip_size));
1489 ut_ad(buf);
1490 ut_ad(len > 0);
1491@@ -175,7 +175,7 @@
1492 #ifndef MYSQL_SERVER
1493 innodb_overwrite_relay_log_info = FALSE;
1494 #endif
1495-@@ -7291,9 +7353,9 @@
1496+@@ -7290,9 +7352,9 @@
1497 | DICT_TF_COMPACT
1498 | DICT_TF_FORMAT_ZIP
1499 << DICT_TF_FORMAT_SHIFT;
1500@@ -188,7 +188,7 @@
1501 }
1502 }
1503
1504-@@ -11544,6 +11606,16 @@
1505+@@ -11553,6 +11615,16 @@
1506 "#### Attention: The checksum is not compatible for normal or disabled version! ####",
1507 NULL, NULL, FALSE);
1508
1509@@ -205,7 +205,7 @@
1510 static MYSQL_SYSVAR_STR(data_home_dir, innobase_data_home_dir,
1511 PLUGIN_VAR_READONLY,
1512 "The common part for InnoDB table spaces.",
1513-@@ -12070,6 +12142,8 @@
1514+@@ -12079,6 +12151,8 @@
1515 NULL, NULL, 0, &corrupt_table_action_typelib);
1516
1517 static struct st_mysql_sys_var* innobase_system_variables[]= {
1518
1519=== modified file 'patches/innodb_fix_misc.patch'
1520--- patches/innodb_fix_misc.patch 2011-12-08 08:29:49 +0000
1521+++ patches/innodb_fix_misc.patch 2011-12-29 02:23:24 +0000
1522@@ -12,7 +12,7 @@
1523 # should be done or reviewed by the maintainer!
1524 --- a/storage/innobase/buf/buf0buf.c
1525 +++ b/storage/innobase/buf/buf0buf.c
1526-@@ -1944,6 +1944,27 @@
1527+@@ -1979,6 +1979,27 @@
1528 #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
1529 }
1530
1531@@ -40,7 +40,7 @@
1532 if (UNIV_UNLIKELY(!bpage->zip.data)) {
1533 /* There is no compressed page. */
1534 err_exit:
1535-@@ -2452,6 +2473,27 @@
1536+@@ -2487,6 +2508,27 @@
1537 block = (buf_block_t*) buf_page_hash_get_low(
1538 buf_pool, space, offset, fold);
1539 if (block) {
1540@@ -68,7 +68,7 @@
1541 block_mutex = buf_page_get_mutex_enter((buf_page_t*)block);
1542 ut_a(block_mutex);
1543 }
1544-@@ -3374,11 +3416,28 @@
1545+@@ -3409,11 +3451,28 @@
1546
1547 fold = buf_page_address_fold(space, offset);
1548
1549@@ -97,7 +97,7 @@
1550 if (watch_page && !buf_pool_watch_is_sentinel(buf_pool, watch_page)) {
1551 /* The page is already in the buffer pool. */
1552 watch_page = NULL;
1553-@@ -3509,6 +3568,7 @@
1554+@@ -3544,6 +3603,7 @@
1555 bpage->state = BUF_BLOCK_ZIP_PAGE;
1556 bpage->space = space;
1557 bpage->offset = offset;
1558@@ -105,7 +105,7 @@
1559
1560 #ifdef UNIV_DEBUG
1561 bpage->in_page_hash = FALSE;
1562-@@ -3593,6 +3653,7 @@
1563+@@ -3628,6 +3688,7 @@
1564
1565 fold = buf_page_address_fold(space, offset);
1566
1567@@ -113,7 +113,7 @@
1568 //buf_pool_mutex_enter(buf_pool);
1569 mutex_enter(&buf_pool->LRU_list_mutex);
1570 rw_lock_x_lock(&buf_pool->page_hash_latch);
1571-@@ -3600,6 +3661,21 @@
1572+@@ -3635,6 +3696,21 @@
1573 block = (buf_block_t*) buf_page_hash_get_low(
1574 buf_pool, space, offset, fold);
1575
1576@@ -135,7 +135,7 @@
1577 if (block
1578 && buf_page_in_file(&block->page)
1579 && !buf_pool_watch_is_sentinel(buf_pool, &block->page)) {
1580-@@ -3953,8 +4029,11 @@
1581+@@ -3988,8 +4064,11 @@
1582 }
1583
1584 if (io_type == BUF_IO_WRITE
1585@@ -308,7 +308,7 @@
1586 #endif
1587 /* printf("Deleting tablespace %s id %lu\n", space->name, id); */
1588
1589-@@ -4722,6 +4729,10 @@
1590+@@ -4731,6 +4738,10 @@
1591 ulint page_size;
1592 ibool success = TRUE;
1593
1594@@ -319,7 +319,7 @@
1595 fil_mutex_enter_and_prepare_for_io(space_id);
1596
1597 space = fil_space_get_by_id(space_id);
1598-@@ -4733,6 +4744,7 @@
1599+@@ -4742,6 +4753,7 @@
1600 *actual_size = space->size;
1601
1602 mutex_exit(&fil_system->mutex);
1603@@ -327,7 +327,7 @@
1604
1605 return(TRUE);
1606 }
1607-@@ -4765,6 +4777,8 @@
1608+@@ -4774,6 +4786,8 @@
1609 offset_low = ((start_page_no - file_start_page_no)
1610 % (4096 * ((1024 * 1024) / page_size)))
1611 * page_size;
1612@@ -336,7 +336,7 @@
1613 #ifdef UNIV_HOTBACKUP
1614 success = os_file_write(node->name, node->handle, buf,
1615 offset_low, offset_high,
1616-@@ -4774,8 +4788,10 @@
1617+@@ -4783,8 +4797,10 @@
1618 node->name, node->handle, buf,
1619 offset_low, offset_high,
1620 page_size * n_pages,
1621@@ -348,7 +348,7 @@
1622 if (success) {
1623 node->size += n_pages;
1624 space->size += n_pages;
1625-@@ -4821,6 +4837,7 @@
1626+@@ -4830,6 +4846,7 @@
1627 printf("Extended %s to %lu, actual size %lu pages\n", space->name,
1628 size_after_extend, *actual_size); */
1629 mutex_exit(&fil_system->mutex);
1630@@ -356,7 +356,7 @@
1631
1632 fil_flush(space_id, TRUE);
1633
1634-@@ -5183,6 +5200,22 @@
1635+@@ -5192,6 +5209,22 @@
1636 srv_data_written+= len;
1637 }
1638
1639@@ -379,7 +379,7 @@
1640 /* Reserve the fil_system mutex and make sure that we can open at
1641 least one file while holding it, if the file is not already open */
1642
1643-@@ -5324,10 +5357,24 @@
1644+@@ -5333,10 +5366,24 @@
1645 #else
1646 /* Queue the aio request */
1647 ret = os_aio(type, mode | wake_later, node->name, node->handle, buf,
1648@@ -405,7 +405,7 @@
1649 ut_a(ret);
1650
1651 if (mode == OS_AIO_SYNC) {
1652-@@ -5427,6 +5474,7 @@
1653+@@ -5436,6 +5483,7 @@
1654 fil_node_t* fil_node;
1655 void* message;
1656 ulint type;
1657@@ -413,7 +413,7 @@
1658
1659 ut_ad(fil_validate_skip());
1660
1661-@@ -5434,10 +5482,10 @@
1662+@@ -5443,10 +5491,10 @@
1663 srv_set_io_thread_op_info(segment, "native aio handle");
1664 #ifdef WIN_ASYNC_IO
1665 ret = os_aio_windows_handle(segment, 0, &fil_node,
1666@@ -426,7 +426,7 @@
1667 #else
1668 ut_error;
1669 ret = 0; /* Eliminate compiler warning */
1670-@@ -5446,7 +5494,22 @@
1671+@@ -5455,7 +5503,22 @@
1672 srv_set_io_thread_op_info(segment, "simulated aio handle");
1673
1674 ret = os_aio_simulated_handle(segment, &fil_node,
1675@@ -452,7 +452,7 @@
1676 ut_a(ret);
1677 --- a/storage/innobase/handler/ha_innodb.cc
1678 +++ b/storage/innobase/handler/ha_innodb.cc
1679-@@ -12141,6 +12141,12 @@
1680+@@ -12150,6 +12150,12 @@
1681 "except for the deletion.",
1682 NULL, NULL, 0, &corrupt_table_action_typelib);
1683
1684@@ -465,7 +465,7 @@
1685 static struct st_mysql_sys_var* innobase_system_variables[]= {
1686 MYSQL_SYSVAR(page_size),
1687 MYSQL_SYSVAR(log_block_size),
1688-@@ -12235,6 +12241,7 @@
1689+@@ -12244,6 +12250,7 @@
1690 MYSQL_SYSVAR(purge_batch_size),
1691 MYSQL_SYSVAR(rollback_segments),
1692 MYSQL_SYSVAR(corrupt_table_action),
1693@@ -473,7 +473,7 @@
1694 NULL
1695 };
1696
1697-@@ -12244,7 +12251,7 @@
1698+@@ -12253,7 +12260,7 @@
1699 &innobase_storage_engine,
1700 innobase_hton_name,
1701 plugin_author,
1702
1703=== modified file 'patches/innodb_io_patches.patch'
1704--- patches/innodb_io_patches.patch 2011-12-08 07:51:45 +0000
1705+++ patches/innodb_io_patches.patch 2011-12-29 02:23:24 +0000
1706@@ -175,7 +175,7 @@
1707 srv_force_recovery = (ulint) innobase_force_recovery;
1708
1709 srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite;
1710-@@ -11133,7 +11153,7 @@
1711+@@ -11142,7 +11162,7 @@
1712 PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY,
1713 "Purge threads can be either 0 or 1.",
1714 NULL, NULL,
1715@@ -184,7 +184,7 @@
1716 0, /* Minimum value */
1717 1, 0); /* Maximum value */
1718
1719-@@ -11175,12 +11195,18 @@
1720+@@ -11184,12 +11204,18 @@
1721 innodb_file_format_max_validate,
1722 innodb_file_format_max_update, "Antelope");
1723
1724@@ -209,7 +209,7 @@
1725
1726 static MYSQL_SYSVAR_STR(flush_method, innobase_file_flush_method,
1727 PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
1728-@@ -11285,7 +11311,7 @@
1729+@@ -11294,7 +11320,7 @@
1730 static MYSQL_SYSVAR_LONGLONG(buffer_pool_size, innobase_buffer_pool_size,
1731 PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
1732 "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.",
1733@@ -218,7 +218,7 @@
1734
1735 static MYSQL_SYSVAR_LONG(buffer_pool_instances, innobase_buffer_pool_instances,
1736 PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
1737-@@ -11442,6 +11468,95 @@
1738+@@ -11451,6 +11477,95 @@
1739 "trigger a readahead.",
1740 NULL, NULL, 56, 0, 64, 0);
1741
1742@@ -314,7 +314,7 @@
1743 static struct st_mysql_sys_var* innobase_system_variables[]= {
1744 MYSQL_SYSVAR(additional_mem_pool_size),
1745 MYSQL_SYSVAR(autoextend_increment),
1746-@@ -11462,6 +11577,7 @@
1747+@@ -11471,6 +11586,7 @@
1748 MYSQL_SYSVAR(file_format_check),
1749 MYSQL_SYSVAR(file_format_max),
1750 MYSQL_SYSVAR(flush_log_at_trx_commit),
1751@@ -322,7 +322,7 @@
1752 MYSQL_SYSVAR(flush_method),
1753 MYSQL_SYSVAR(force_recovery),
1754 MYSQL_SYSVAR(large_prefix),
1755-@@ -11501,6 +11617,13 @@
1756+@@ -11510,6 +11626,13 @@
1757 MYSQL_SYSVAR(show_verbose_locks),
1758 MYSQL_SYSVAR(show_locks_held),
1759 MYSQL_SYSVAR(version),
1760@@ -338,7 +338,7 @@
1761 MYSQL_SYSVAR(change_buffering),
1762 --- a/storage/innobase/ibuf/ibuf0ibuf.c
1763 +++ b/storage/innobase/ibuf/ibuf0ibuf.c
1764-@@ -514,8 +514,10 @@
1765+@@ -523,8 +523,10 @@
1766 grow in size, as the references on the upper levels of the tree can
1767 change */
1768
1769@@ -351,7 +351,7 @@
1770
1771 mutex_create(ibuf_pessimistic_insert_mutex_key,
1772 &ibuf_pessimistic_insert_mutex,
1773-@@ -2753,9 +2755,11 @@
1774+@@ -2763,9 +2765,11 @@
1775 size = ibuf->size;
1776 max_size = ibuf->max_size;
1777
1778
1779=== modified file 'patches/innodb_kill_idle_transaction.patch'
1780--- patches/innodb_kill_idle_transaction.patch 2011-11-16 09:26:51 +0000
1781+++ patches/innodb_kill_idle_transaction.patch 2011-12-29 02:23:24 +0000
1782@@ -114,7 +114,7 @@
1783 #ifdef HAVE_PSI_INTERFACE
1784 /* Register keys with MySQL performance schema */
1785 if (PSI_server) {
1786-@@ -11686,6 +11690,57 @@
1787+@@ -11695,6 +11699,57 @@
1788 return(false);
1789 }
1790
1791@@ -172,7 +172,7 @@
1792 static SHOW_VAR innodb_status_variables_export[]= {
1793 {"Innodb", (char*) &show_innodb_vars, SHOW_FUNC},
1794 {NullS, NullS, SHOW_LONG}
1795-@@ -11977,6 +12032,15 @@
1796+@@ -11986,6 +12041,15 @@
1797 "Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got the ticket",
1798 NULL, NULL, 500L, 1L, ~0L, 0);
1799
1800@@ -188,7 +188,7 @@
1801 static MYSQL_SYSVAR_LONG(file_io_threads, innobase_file_io_threads,
1802 PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY | PLUGIN_VAR_NOSYSVAR,
1803 "Number of file I/O threads in InnoDB.",
1804-@@ -12279,6 +12343,7 @@
1805+@@ -12288,6 +12352,7 @@
1806 MYSQL_SYSVAR(fast_checksum),
1807 MYSQL_SYSVAR(commit_concurrency),
1808 MYSQL_SYSVAR(concurrency_tickets),
1809
1810=== modified file 'patches/innodb_lru_dump_restore.patch'
1811--- patches/innodb_lru_dump_restore.patch 2011-11-14 10:30:04 +0000
1812+++ patches/innodb_lru_dump_restore.patch 2011-12-29 02:23:24 +0000
1813@@ -310,7 +310,7 @@
1814 /*==============*/
1815 --- a/storage/innobase/fil/fil0fil.c
1816 +++ b/storage/innobase/fil/fil0fil.c
1817-@@ -5290,6 +5290,70 @@
1818+@@ -5299,6 +5299,70 @@
1819 return(DB_SUCCESS);
1820 }
1821
1822@@ -401,7 +401,7 @@
1823 #ifdef HAVE_LARGE_PAGES
1824 if ((os_use_large_pages = (ibool) my_use_large_pages))
1825 os_large_page_size = (ulint) opt_large_page_size;
1826-@@ -11916,6 +11920,19 @@
1827+@@ -11925,6 +11929,19 @@
1828 "Limit the allocated memory for dictionary cache. (0: unlimited)",
1829 NULL, NULL, 0, 0, LONG_MAX, 0);
1830
1831@@ -421,7 +421,7 @@
1832 static struct st_mysql_sys_var* innobase_system_variables[]= {
1833 MYSQL_SYSVAR(additional_mem_pool_size),
1834 MYSQL_SYSVAR(autoextend_increment),
1835-@@ -12000,6 +12017,8 @@
1836+@@ -12009,6 +12026,8 @@
1837 MYSQL_SYSVAR(random_read_ahead),
1838 MYSQL_SYSVAR(read_ahead_threshold),
1839 MYSQL_SYSVAR(io_capacity),
1840@@ -440,7 +440,7 @@
1841 }
1842
1843 #define OK(expr) \
1844-@@ -4298,6 +4299,36 @@
1845+@@ -4336,6 +4337,36 @@
1846 "Hello!");
1847 goto end_func;
1848 }
1849@@ -540,7 +540,7 @@
1850 an exclusive lock on the buffer frame. The flag is cleared and the x-lock
1851 --- a/storage/innobase/include/fil0fil.h
1852 +++ b/storage/innobase/include/fil0fil.h
1853-@@ -644,6 +644,14 @@
1854+@@ -648,6 +648,14 @@
1855 void* message, /*!< in: message for aio handler if non-sync
1856 aio used, else ignored */
1857 trx_t* trx);
1858
1859=== modified file 'patches/innodb_opt_lru_count.patch'
1860--- patches/innodb_opt_lru_count.patch 2011-12-05 08:46:53 +0000
1861+++ patches/innodb_opt_lru_count.patch 2011-12-29 02:23:24 +0000
1862@@ -18,7 +18,7 @@
1863 ut_a(buf_page_get_state(bpage) == BUF_BLOCK_ZIP_FREE);
1864 --- a/storage/innobase/buf/buf0buf.c
1865 +++ b/storage/innobase/buf/buf0buf.c
1866-@@ -880,9 +880,9 @@
1867+@@ -890,9 +890,9 @@
1868 block->page.in_zip_hash = FALSE;
1869 block->page.in_flush_list = FALSE;
1870 block->page.in_free_list = FALSE;
1871@@ -29,7 +29,7 @@
1872 #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
1873 block->n_pointers = 0;
1874 #endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
1875-@@ -1366,7 +1366,7 @@
1876+@@ -1401,7 +1401,7 @@
1877
1878 memcpy(dpage, bpage, sizeof *dpage);
1879
1880@@ -38,7 +38,7 @@
1881 ut_d(bpage->in_page_hash = FALSE);
1882
1883 /* relocate buf_pool->LRU */
1884-@@ -3188,8 +3188,8 @@
1885+@@ -3223,8 +3223,8 @@
1886 bpage->in_zip_hash = FALSE;
1887 bpage->in_flush_list = FALSE;
1888 bpage->in_free_list = FALSE;
1889@@ -48,7 +48,7 @@
1890
1891 ut_d(bpage->in_page_hash = TRUE);
1892
1893-@@ -3354,7 +3354,7 @@
1894+@@ -3389,7 +3389,7 @@
1895 ibuf_merge_or_delete_for_page(NULL, space, offset, zip_size, TRUE);
1896
1897 /* Flush pages from the end of the LRU list if necessary */
1898
1899=== modified file 'patches/innodb_overwrite_relay_log_info.patch'
1900--- patches/innodb_overwrite_relay_log_info.patch 2011-12-05 08:47:16 +0000
1901+++ patches/innodb_overwrite_relay_log_info.patch 2011-12-29 02:23:24 +0000
1902@@ -248,7 +248,7 @@
1903
1904 trx_commit_for_mysql(trx);
1905 }
1906-@@ -11122,6 +11314,12 @@
1907+@@ -11131,6 +11323,12 @@
1908 "The common part for InnoDB table spaces.",
1909 NULL, NULL, NULL);
1910
1911@@ -261,7 +261,7 @@
1912 static MYSQL_SYSVAR_BOOL(doublewrite, innobase_use_doublewrite,
1913 PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
1914 "Enable InnoDB doublewrite buffer (enabled by default). "
1915-@@ -11599,6 +11797,7 @@
1916+@@ -11608,6 +11806,7 @@
1917 MYSQL_SYSVAR(old_blocks_pct),
1918 MYSQL_SYSVAR(old_blocks_time),
1919 MYSQL_SYSVAR(open_files),
1920
1921=== modified file 'patches/innodb_pass_corrupt_table.patch'
1922--- patches/innodb_pass_corrupt_table.patch 2011-12-06 03:39:36 +0000
1923+++ patches/innodb_pass_corrupt_table.patch 2011-12-29 02:23:24 +0000
1924@@ -146,7 +146,7 @@
1925 #ifdef UNIV_BTR_DEBUG
1926 ut_a(page_is_comp(get_block->frame) == page_is_comp(page));
1927 #endif /* UNIV_BTR_DEBUG */
1928-@@ -592,6 +622,19 @@
1929+@@ -590,6 +620,19 @@
1930 file, line, mtr);
1931
1932 if (block == NULL) {
1933@@ -166,7 +166,7 @@
1934 /* This must be a search to perform an insert/delete
1935 mark/ delete; try using the insert/delete buffer */
1936
1937-@@ -666,6 +709,16 @@
1938+@@ -664,6 +707,16 @@
1939 block->check_index_page_at_flush = TRUE;
1940 page = buf_block_get_frame(block);
1941
1942@@ -183,7 +183,7 @@
1943 if (rw_latch != RW_NO_LATCH) {
1944 #ifdef UNIV_ZIP_DEBUG
1945 const page_zip_des_t* page_zip
1946-@@ -872,6 +925,17 @@
1947+@@ -857,6 +910,17 @@
1948 RW_NO_LATCH, NULL, BUF_GET,
1949 file, line, mtr);
1950 page = buf_block_get_frame(block);
1951@@ -201,7 +201,7 @@
1952 ut_ad(index->id == btr_page_get_index_id(page));
1953
1954 block->check_index_page_at_flush = TRUE;
1955-@@ -992,6 +1056,14 @@
1956+@@ -977,6 +1041,14 @@
1957 RW_NO_LATCH, NULL, BUF_GET,
1958 file, line, mtr);
1959 page = buf_block_get_frame(block);
1960@@ -216,7 +216,7 @@
1961 ut_ad(index->id == btr_page_get_index_id(page));
1962
1963 if (height == ULINT_UNDEFINED) {
1964-@@ -1205,6 +1277,12 @@
1965+@@ -1190,6 +1262,12 @@
1966 *big_rec = NULL;
1967
1968 block = btr_cur_get_block(cursor);
1969@@ -229,7 +229,7 @@
1970 page = buf_block_get_frame(block);
1971 index = cursor->index;
1972 zip_size = buf_block_get_zip_size(block);
1973-@@ -2937,6 +3015,11 @@
1974+@@ -2922,6 +3000,11 @@
1975
1976 block = btr_cur_get_block(cursor);
1977
1978@@ -241,7 +241,7 @@
1979 ut_ad(page_is_leaf(buf_block_get_frame(block)));
1980
1981 rec = btr_cur_get_rec(cursor);
1982-@@ -3645,6 +3728,11 @@
1983+@@ -3630,6 +3713,11 @@
1984
1985 page = btr_cur_get_page(&cursor);
1986
1987@@ -277,7 +277,7 @@
1988 index = btr_cur_get_index(btr_pcur_get_btr_cur(cursor));
1989
1990 page_cursor = btr_pcur_get_page_cur(cursor);
1991-@@ -395,6 +401,15 @@
1992+@@ -397,6 +403,15 @@
1993 cursor->latch_mode,
1994 btr_pcur_get_btr_cur(cursor)->index, mtr);
1995 next_page = buf_block_get_frame(next_block);
1996@@ -326,7 +326,7 @@
1997
1998 /* prototypes for new functions added to ha_innodb.cc */
1999 trx_t* innobase_get_trx();
2000-@@ -1134,6 +1135,11 @@
2001+@@ -1151,6 +1152,11 @@
2002 ready = buf_flush_ready_for_replace(&block->page);
2003 mutex_exit(&block->mutex);
2004
2005@@ -338,7 +338,7 @@
2006 if (!ready) {
2007
2008 return(block);
2009-@@ -1910,6 +1916,13 @@
2010+@@ -1945,6 +1951,13 @@
2011 return(NULL);
2012 }
2013
2014@@ -352,7 +352,7 @@
2015 block_mutex = buf_page_get_mutex_enter(bpage);
2016
2017 rw_lock_s_unlock(&buf_pool->page_hash_latch);
2018-@@ -2489,6 +2502,13 @@
2019+@@ -2524,6 +2537,13 @@
2020 return(NULL);
2021 }
2022
2023@@ -366,7 +366,7 @@
2024 switch (buf_block_get_state(block)) {
2025 buf_page_t* bpage;
2026 ibool success;
2027-@@ -3163,6 +3183,7 @@
2028+@@ -3198,6 +3218,7 @@
2029 bpage->newest_modification = 0;
2030 bpage->oldest_modification = 0;
2031 HASH_INVALIDATE(bpage, hash);
2032@@ -374,7 +374,7 @@
2033 #if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
2034 bpage->file_page_was_freed = FALSE;
2035 #endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */
2036-@@ -3801,6 +3822,7 @@
2037+@@ -3836,6 +3857,7 @@
2038 (ulong) bpage->offset);
2039 }
2040
2041@@ -382,7 +382,7 @@
2042 /* From version 3.23.38 up we store the page checksum
2043 to the 4 first bytes of the page end lsn field */
2044
2045-@@ -3842,6 +3864,23 @@
2046+@@ -3877,6 +3899,23 @@
2047 REFMAN "forcing-innodb-recovery.html\n"
2048 "InnoDB: about forcing recovery.\n", stderr);
2049
2050@@ -406,7 +406,7 @@
2051 if (srv_force_recovery < SRV_FORCE_IGNORE_CORRUPT) {
2052 /* If page space id is larger than TRX_SYS_SPACE
2053 (0), we will attempt to mark the corresponding
2054-@@ -3858,6 +3897,7 @@
2055+@@ -3893,6 +3932,7 @@
2056 }
2057 }
2058 }
2059@@ -414,7 +414,7 @@
2060
2061 if (recv_recovery_is_on()) {
2062 /* Pages must be uncompressed for crash recovery. */
2063-@@ -3867,8 +3907,11 @@
2064+@@ -3902,8 +3942,11 @@
2065
2066 if (uncompressed && !recv_no_ibuf_operations) {
2067 ibuf_merge_or_delete_for_page(
2068@@ -584,7 +584,7 @@
2069 UT_LIST_ADD_LAST(space_list, fil_system->space_list, space);
2070
2071 mutex_exit(&fil_system->mutex);
2072-@@ -5268,6 +5271,34 @@
2073+@@ -5277,6 +5280,34 @@
2074 ut_a(byte_offset % OS_FILE_LOG_BLOCK_SIZE == 0);
2075 ut_a((len % OS_FILE_LOG_BLOCK_SIZE) == 0);
2076
2077@@ -619,7 +619,7 @@
2078 #ifdef UNIV_HOTBACKUP
2079 /* In ibbackup do normal i/o, not aio */
2080 if (type == OS_FILE_READ) {
2081-@@ -5282,6 +5313,8 @@
2082+@@ -5291,6 +5322,8 @@
2083 ret = os_aio(type, mode | wake_later, node->name, node->handle, buf,
2084 offset_low, offset_high, len, node, message, trx);
2085 #endif
2086@@ -628,7 +628,7 @@
2087 ut_a(ret);
2088
2089 if (mode == OS_AIO_SYNC) {
2090-@@ -5782,3 +5815,46 @@
2091+@@ -5791,3 +5824,46 @@
2092 return 0;
2093 }
2094 }
2095@@ -831,7 +831,7 @@
2096 if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT)
2097 table->timestamp_field->set_time();
2098
2099-@@ -5404,6 +5427,10 @@
2100+@@ -5403,6 +5426,10 @@
2101 func_exit:
2102 innobase_active_small();
2103
2104@@ -842,7 +842,7 @@
2105 DBUG_RETURN(error_result);
2106 }
2107
2108-@@ -5581,6 +5608,10 @@
2109+@@ -5580,6 +5607,10 @@
2110
2111 ha_statistic_increment(&SSV::ha_update_count);
2112
2113@@ -853,7 +853,7 @@
2114 if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE)
2115 table->timestamp_field->set_time();
2116
2117-@@ -5670,6 +5701,10 @@
2118+@@ -5668,6 +5699,10 @@
2119
2120 innobase_active_small();
2121
2122@@ -864,7 +864,7 @@
2123 DBUG_RETURN(error);
2124 }
2125
2126-@@ -5691,6 +5726,10 @@
2127+@@ -5689,6 +5724,10 @@
2128
2129 ha_statistic_increment(&SSV::ha_delete_count);
2130
2131@@ -875,7 +875,7 @@
2132 if (!prebuilt->upd_node) {
2133 row_get_prebuilt_update_vector(prebuilt);
2134 }
2135-@@ -5717,6 +5756,10 @@
2136+@@ -5715,6 +5754,10 @@
2137
2138 innobase_active_small();
2139
2140@@ -886,7 +886,7 @@
2141 DBUG_RETURN(error);
2142 }
2143
2144-@@ -5956,6 +5999,10 @@
2145+@@ -5954,6 +5997,10 @@
2146
2147 ha_statistic_increment(&SSV::ha_read_key_count);
2148
2149@@ -897,7 +897,7 @@
2150 index = prebuilt->index;
2151
2152 if (UNIV_UNLIKELY(index == NULL) || dict_index_is_corrupted(index)) {
2153-@@ -6023,6 +6070,10 @@
2154+@@ -6022,6 +6069,10 @@
2155 ret = DB_UNSUPPORTED;
2156 }
2157
2158@@ -908,7 +908,7 @@
2159 switch (ret) {
2160 case DB_SUCCESS:
2161 error = 0;
2162-@@ -6138,6 +6189,10 @@
2163+@@ -6137,6 +6188,10 @@
2164 {
2165 DBUG_ENTER("change_active_index");
2166
2167@@ -919,7 +919,7 @@
2168 ut_ad(user_thd == ha_thd());
2169 ut_a(prebuilt->trx == thd_to_trx(user_thd));
2170
2171-@@ -6251,6 +6306,10 @@
2172+@@ -6250,6 +6305,10 @@
2173
2174 DBUG_ENTER("general_fetch");
2175
2176@@ -930,7 +930,7 @@
2177 ut_a(prebuilt->trx == thd_to_trx(user_thd));
2178
2179 innodb_srv_conc_enter_innodb(prebuilt->trx);
2180-@@ -6260,6 +6319,10 @@
2181+@@ -6259,6 +6318,10 @@
2182
2183 innodb_srv_conc_exit_innodb(prebuilt->trx);
2184
2185@@ -941,7 +941,7 @@
2186 switch (ret) {
2187 case DB_SUCCESS:
2188 error = 0;
2189-@@ -7526,10 +7589,18 @@
2190+@@ -7525,10 +7588,18 @@
2191
2192 update_thd(ha_thd());
2193
2194@@ -960,7 +960,7 @@
2195 error = convert_error_code_to_mysql(error, prebuilt->table->flags,
2196 NULL);
2197
2198-@@ -8034,6 +8105,16 @@
2199+@@ -8040,6 +8111,16 @@
2200 return(ranges + (double) rows / (double) total_rows * time_for_scan);
2201 }
2202
2203@@ -977,7 +977,7 @@
2204 /*********************************************************************//**
2205 Calculates the key number used inside MySQL for an Innobase index. We will
2206 first check the "index translation table" for a match of the index to get
2207-@@ -8211,7 +8292,7 @@
2208+@@ -8217,7 +8298,7 @@
2209 ib_table = prebuilt->table;
2210
2211 if (flag & HA_STATUS_TIME) {
2212@@ -986,7 +986,7 @@
2213 /* In sql_show we call with this flag: update
2214 then statistics so that they are up-to-date */
2215
2216-@@ -8511,10 +8592,18 @@
2217+@@ -8517,10 +8598,18 @@
2218 THD* thd, /*!< in: connection thread handle */
2219 HA_CHECK_OPT* check_opt) /*!< in: currently ignored */
2220 {
2221@@ -1005,7 +1005,7 @@
2222 return(0);
2223 }
2224
2225-@@ -8747,6 +8836,10 @@
2226+@@ -8756,6 +8845,10 @@
2227 my_error(ER_QUERY_INTERRUPTED, MYF(0));
2228 }
2229
2230@@ -1016,7 +1016,7 @@
2231 DBUG_RETURN(is_ok ? HA_ADMIN_OK : HA_ADMIN_CORRUPT);
2232 }
2233
2234-@@ -9517,6 +9610,10 @@
2235+@@ -9526,6 +9619,10 @@
2236
2237 update_thd(thd);
2238
2239@@ -1027,7 +1027,7 @@
2240 if (prebuilt->table->ibd_file_missing && !thd_tablespace_op(thd)) {
2241 ut_print_timestamp(stderr);
2242 fprintf(stderr,
2243-@@ -11941,6 +12038,26 @@
2244+@@ -11950,6 +12047,26 @@
2245 "dump file (if present). Disabled by default.",
2246 NULL, NULL, FALSE);
2247
2248@@ -1054,7 +1054,7 @@
2249 static struct st_mysql_sys_var* innobase_system_variables[]= {
2250 MYSQL_SYSVAR(additional_mem_pool_size),
2251 MYSQL_SYSVAR(autoextend_increment),
2252-@@ -12031,6 +12148,7 @@
2253+@@ -12040,6 +12157,7 @@
2254 MYSQL_SYSVAR(purge_threads),
2255 MYSQL_SYSVAR(purge_batch_size),
2256 MYSQL_SYSVAR(rollback_segments),
2257@@ -1175,7 +1175,7 @@
2258 #ifdef UNIV_DEBUG
2259 --- a/storage/innobase/include/fil0fil.h
2260 +++ b/storage/innobase/include/fil0fil.h
2261-@@ -750,6 +750,19 @@
2262+@@ -754,6 +754,19 @@
2263 fil_system_hash_nodes(void);
2264 /*========================*/
2265
2266
2267=== modified file 'patches/innodb_recovery_patches.patch'
2268--- patches/innodb_recovery_patches.patch 2011-11-14 10:30:04 +0000
2269+++ patches/innodb_recovery_patches.patch 2011-12-29 02:23:24 +0000
2270@@ -124,7 +124,7 @@
2271 srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite;
2272 srv_use_checksums = (ibool) innobase_use_checksums;
2273
2274-@@ -11382,6 +11385,11 @@
2275+@@ -11391,6 +11394,11 @@
2276 "The common part for InnoDB table spaces.",
2277 NULL, NULL, NULL);
2278
2279@@ -136,7 +136,7 @@
2280 static MYSQL_SYSVAR_BOOL(recovery_update_relay_log, innobase_overwrite_relay_log_info,
2281 PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
2282 "During InnoDB crash recovery on slave overwrite relay-log.info "
2283-@@ -11870,6 +11878,7 @@
2284+@@ -11879,6 +11887,7 @@
2285 MYSQL_SYSVAR(data_file_path),
2286 MYSQL_SYSVAR(data_home_dir),
2287 MYSQL_SYSVAR(doublewrite),
2288
2289=== modified file 'patches/innodb_separate_doublewrite.patch'
2290--- patches/innodb_separate_doublewrite.patch 2011-12-06 03:39:36 +0000
2291+++ patches/innodb_separate_doublewrite.patch 2011-12-29 02:23:24 +0000
2292@@ -7,7 +7,7 @@
2293 # should be done or reviewed by the maintainer!
2294 --- a/storage/innobase/buf/buf0buf.c
2295 +++ b/storage/innobase/buf/buf0buf.c
2296-@@ -3770,7 +3770,8 @@
2297+@@ -3805,7 +3805,8 @@
2298 read_space_id = mach_read_from_4(
2299 frame + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
2300
2301@@ -262,7 +262,7 @@
2302 if (err != DB_SUCCESS) {
2303
2304 return(err);
2305-@@ -4159,7 +4169,7 @@
2306+@@ -4168,7 +4178,7 @@
2307 }
2308
2309 #ifndef UNIV_HOTBACKUP
2310@@ -271,7 +271,7 @@
2311 fprintf(stderr,
2312 "InnoDB: Error: tablespace id %lu in file %s"
2313 " is not sensible\n",
2314-@@ -4168,7 +4178,7 @@
2315+@@ -4177,7 +4187,7 @@
2316 goto func_exit;
2317 }
2318 #else
2319@@ -280,7 +280,7 @@
2320 char* new_path;
2321
2322 fprintf(stderr,
2323-@@ -4989,7 +4999,7 @@
2324+@@ -4998,7 +5008,7 @@
2325 }
2326
2327 if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE
2328@@ -289,7 +289,7 @@
2329 /* The node is in the LRU list, remove it */
2330
2331 ut_a(UT_LIST_GET_LEN(system->LRU) > 0);
2332-@@ -5035,7 +5045,7 @@
2333+@@ -5044,7 +5054,7 @@
2334 }
2335
2336 if (node->n_pending == 0 && node->space->purpose == FIL_TABLESPACE
2337@@ -298,7 +298,7 @@
2338 /* The node must be put back to the LRU list */
2339 UT_LIST_ADD_FIRST(LRU, system->LRU, node);
2340 }
2341-@@ -5646,7 +5656,7 @@
2342+@@ -5655,7 +5665,7 @@
2343 ut_a(fil_node->n_pending == 0);
2344 ut_a(fil_node->open);
2345 ut_a(fil_node->space->purpose == FIL_TABLESPACE);
2346@@ -350,7 +350,7 @@
2347 srv_use_sys_stats_table = (ibool) innobase_use_sys_stats_table;
2348
2349 /* -------------- Log files ---------------------------*/
2350-@@ -11763,6 +11766,11 @@
2351+@@ -11772,6 +11775,11 @@
2352 "Path to individual files and their sizes.",
2353 NULL, NULL, NULL);
2354
2355@@ -362,7 +362,7 @@
2356 static MYSQL_SYSVAR_LONG(autoinc_lock_mode, innobase_autoinc_lock_mode,
2357 PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
2358 "The AUTOINC lock modes supported by InnoDB: "
2359-@@ -11942,6 +11950,7 @@
2360+@@ -11951,6 +11959,7 @@
2361 MYSQL_SYSVAR(commit_concurrency),
2362 MYSQL_SYSVAR(concurrency_tickets),
2363 MYSQL_SYSVAR(data_file_path),
2364
2365=== modified file 'patches/innodb_show_lock_name.patch'
2366--- patches/innodb_show_lock_name.patch 2011-12-06 03:39:36 +0000
2367+++ patches/innodb_show_lock_name.patch 2011-12-29 02:23:24 +0000
2368@@ -7,7 +7,7 @@
2369 # should be done or reviewed by the maintainer!
2370 --- a/storage/innobase/handler/ha_innodb.cc
2371 +++ b/storage/innobase/handler/ha_innodb.cc
2372-@@ -9701,9 +9701,8 @@
2373+@@ -9710,9 +9710,8 @@
2374 rw_lock_wait_time += mutex->lspent_time;
2375 }
2376 #else /* UNIV_DEBUG */
2377@@ -19,7 +19,7 @@
2378 buf2len= (uint) my_snprintf(buf2, sizeof(buf2), "os_waits=%lu",
2379 (ulong) mutex->count_os_wait);
2380
2381-@@ -9718,10 +9717,8 @@
2382+@@ -9727,10 +9726,8 @@
2383
2384 if (block_mutex) {
2385 buf1len = (uint) my_snprintf(buf1, sizeof buf1,
2386@@ -32,7 +32,7 @@
2387 buf2len = (uint) my_snprintf(buf2, sizeof buf2,
2388 "os_waits=%lu",
2389 (ulong) block_mutex_oswait_count);
2390-@@ -9750,9 +9747,8 @@
2391+@@ -9759,9 +9756,8 @@
2392 continue;
2393 }
2394
2395@@ -44,7 +44,7 @@
2396 buf2len = my_snprintf(buf2, sizeof buf2, "os_waits=%lu",
2397 (ulong) lock->count_os_wait);
2398
2399-@@ -9766,10 +9762,8 @@
2400+@@ -9775,10 +9771,8 @@
2401
2402 if (block_lock) {
2403 buf1len = (uint) my_snprintf(buf1, sizeof buf1,
2404
2405=== modified file 'patches/innodb_show_status.patch'
2406--- patches/innodb_show_status.patch 2011-12-05 08:46:28 +0000
2407+++ patches/innodb_show_status.patch 2011-12-29 02:23:24 +0000
2408@@ -7,7 +7,7 @@
2409 # should be done or reviewed by the maintainer!
2410 --- a/storage/innobase/buf/buf0buf.c
2411 +++ b/storage/innobase/buf/buf0buf.c
2412-@@ -4330,6 +4330,7 @@
2413+@@ -4365,6 +4365,7 @@
2414 }
2415
2416 total_info->pool_size += pool_info->pool_size;
2417@@ -15,7 +15,7 @@
2418 total_info->lru_len += pool_info->lru_len;
2419 total_info->old_lru_len += pool_info->old_lru_len;
2420 total_info->free_list_len += pool_info->free_list_len;
2421-@@ -4395,6 +4396,8 @@
2422+@@ -4430,6 +4431,8 @@
2423
2424 pool_info->pool_size = buf_pool->curr_size;
2425
2426@@ -24,7 +24,7 @@
2427 pool_info->lru_len = UT_LIST_GET_LEN(buf_pool->LRU);
2428
2429 pool_info->old_lru_len = buf_pool->LRU_old_len;
2430-@@ -4516,14 +4519,16 @@
2431+@@ -4551,14 +4554,16 @@
2432 ut_ad(pool_info);
2433
2434 fprintf(file,
2435@@ -101,7 +101,7 @@
2436 {"buffer_pool_pages_free",
2437 (char*) &export_vars.innodb_buffer_pool_pages_free, SHOW_LONG},
2438 #ifdef UNIV_DEBUG
2439-@@ -11199,6 +11201,16 @@
2440+@@ -11208,6 +11210,16 @@
2441 "Force InnoDB to not use next-key locking, to use only row-level locking.",
2442 NULL, NULL, FALSE);
2443
2444@@ -118,7 +118,7 @@
2445 #ifdef UNIV_LOG_ARCHIVE
2446 static MYSQL_SYSVAR_STR(log_arch_dir, innobase_log_arch_dir,
2447 PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
2448-@@ -11386,7 +11398,7 @@
2449+@@ -11395,7 +11407,7 @@
2450
2451 static MYSQL_SYSVAR_STR(version, innodb_version_str,
2452 PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_READONLY,
2453@@ -127,7 +127,7 @@
2454
2455 static MYSQL_SYSVAR_BOOL(use_sys_malloc, srv_use_sys_malloc,
2456 PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
2457-@@ -11486,6 +11498,8 @@
2458+@@ -11495,6 +11507,8 @@
2459 MYSQL_SYSVAR(thread_concurrency),
2460 MYSQL_SYSVAR(thread_sleep_delay),
2461 MYSQL_SYSVAR(autoinc_lock_mode),
2462
2463=== modified file 'patches/innodb_show_status_extend.patch'
2464--- patches/innodb_show_status_extend.patch 2011-12-08 07:27:43 +0000
2465+++ patches/innodb_show_status_extend.patch 2011-12-29 02:23:24 +0000
2466@@ -157,7 +157,7 @@
2467
2468 --- a/storage/innobase/ibuf/ibuf0ibuf.c
2469 +++ b/storage/innobase/ibuf/ibuf0ibuf.c
2470-@@ -469,6 +469,45 @@
2471+@@ -478,6 +478,45 @@
2472 }
2473
2474 /******************************************************************//**
2475
2476=== modified file 'patches/innodb_show_sys_tables.patch'
2477--- patches/innodb_show_sys_tables.patch 2011-12-16 09:37:26 +0000
2478+++ patches/innodb_show_sys_tables.patch 2011-12-29 02:23:24 +0000
2479@@ -39,7 +39,7 @@
2480 Determine the flags of a table described in SYS_TABLES.
2481 --- a/storage/innobase/handler/ha_innodb.cc
2482 +++ b/storage/innobase/handler/ha_innodb.cc
2483-@@ -11899,7 +11899,14 @@
2484+@@ -11908,7 +11908,14 @@
2485 i_s_innodb_cmp,
2486 i_s_innodb_cmp_reset,
2487 i_s_innodb_cmpmem,
2488
2489=== modified file 'patches/innodb_split_buf_pool_mutex.patch'
2490--- patches/innodb_split_buf_pool_mutex.patch 2011-12-08 08:06:52 +0000
2491+++ patches/innodb_split_buf_pool_mutex.patch 2011-12-29 02:23:24 +0000
2492@@ -7,7 +7,7 @@
2493 # should be done or reviewed by the maintainer!
2494 --- a/storage/innobase/btr/btr0cur.c
2495 +++ b/storage/innobase/btr/btr0cur.c
2496-@@ -4085,7 +4085,8 @@
2497+@@ -4070,7 +4070,8 @@
2498
2499 mtr_commit(mtr);
2500
2501@@ -17,7 +17,7 @@
2502 mutex_enter(&block->mutex);
2503
2504 /* Only free the block if it is still allocated to
2505-@@ -4096,16 +4097,21 @@
2506+@@ -4081,16 +4082,21 @@
2507 && buf_block_get_space(block) == space
2508 && buf_block_get_page_no(block) == page_no) {
2509
2510@@ -449,7 +449,7 @@
2511 UNIV_INTERN mysql_pfs_key_t flush_list_mutex_key;
2512 #endif /* UNIV_PFS_MUTEX */
2513
2514-@@ -880,9 +885,13 @@
2515+@@ -890,9 +895,13 @@
2516 block->page.in_zip_hash = FALSE;
2517 block->page.in_flush_list = FALSE;
2518 block->page.in_free_list = FALSE;
2519@@ -464,7 +464,7 @@
2520 #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
2521 block->n_pointers = 0;
2522 #endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
2523-@@ -980,9 +989,11 @@
2524+@@ -997,9 +1006,11 @@
2525 memset(block->frame, '\0', UNIV_PAGE_SIZE);
2526 #endif
2527 /* Add the block to the free list */
2528@@ -477,7 +477,7 @@
2529 ut_ad(buf_pool_from_block(block) == buf_pool);
2530
2531 block++;
2532-@@ -1037,7 +1048,8 @@
2533+@@ -1054,7 +1065,8 @@
2534 buf_chunk_t* chunk = buf_pool->chunks;
2535
2536 ut_ad(buf_pool);
2537@@ -487,7 +487,7 @@
2538 for (n = buf_pool->n_chunks; n--; chunk++) {
2539
2540 buf_block_t* block = buf_chunk_contains_zip(chunk, data);
2541-@@ -1143,9 +1155,21 @@
2542+@@ -1160,9 +1172,21 @@
2543 ------------------------------- */
2544 mutex_create(buf_pool_mutex_key,
2545 &buf_pool->mutex, SYNC_BUF_POOL);
2546@@ -509,7 +509,7 @@
2547 buf_pool_mutex_enter(buf_pool);
2548
2549 if (buf_pool_size > 0) {
2550-@@ -1158,6 +1182,8 @@
2551+@@ -1175,6 +1199,8 @@
2552 mem_free(chunk);
2553 mem_free(buf_pool);
2554
2555@@ -518,7 +518,7 @@
2556 buf_pool_mutex_exit(buf_pool);
2557
2558 return(DB_ERROR);
2559-@@ -1188,6 +1214,8 @@
2560+@@ -1205,6 +1231,8 @@
2561
2562 /* All fields are initialized by mem_zalloc(). */
2563
2564@@ -527,7 +527,7 @@
2565 buf_pool_mutex_exit(buf_pool);
2566
2567 return(DB_SUCCESS);
2568-@@ -1339,7 +1367,11 @@
2569+@@ -1374,7 +1402,11 @@
2570 ulint fold;
2571 buf_pool_t* buf_pool = buf_pool_from_bpage(bpage);
2572
2573@@ -540,7 +540,7 @@
2574 ut_ad(mutex_own(buf_page_get_mutex(bpage)));
2575 ut_a(buf_page_get_io_fix(bpage) == BUF_IO_NONE);
2576 ut_a(bpage->buf_fix_count == 0);
2577-@@ -1450,21 +1482,32 @@
2578+@@ -1485,21 +1517,32 @@
2579 buf_page_t* bpage;
2580 ulint i;
2581 buf_pool_t* buf_pool = buf_pool_get(space, offset);
2582@@ -574,7 +574,7 @@
2583 for (i = 0; i < BUF_POOL_WATCH_SIZE; i++) {
2584 bpage = &buf_pool->watch[i];
2585
2586-@@ -1488,10 +1531,12 @@
2587+@@ -1523,10 +1566,12 @@
2588 bpage->space = space;
2589 bpage->offset = offset;
2590 bpage->buf_fix_count = 1;
2591@@ -588,7 +588,7 @@
2592 return(NULL);
2593 case BUF_BLOCK_ZIP_PAGE:
2594 ut_ad(bpage->in_page_hash);
2595-@@ -1509,6 +1554,8 @@
2596+@@ -1544,6 +1589,8 @@
2597 ut_error;
2598
2599 /* Fix compiler warning */
2600@@ -597,7 +597,7 @@
2601 return(NULL);
2602 }
2603
2604-@@ -1526,7 +1573,11 @@
2605+@@ -1561,7 +1608,11 @@
2606 space, offset) */
2607 buf_page_t* watch) /*!< in/out: sentinel for watch */
2608 {
2609@@ -610,7 +610,7 @@
2610
2611 HASH_DELETE(buf_page_t, hash, buf_pool->page_hash, fold, watch);
2612 ut_d(watch->in_page_hash = FALSE);
2613-@@ -1548,28 +1599,31 @@
2614+@@ -1583,28 +1634,31 @@
2615 buf_pool_t* buf_pool = buf_pool_get(space, offset);
2616 ulint fold = buf_page_address_fold(space, offset);
2617
2618@@ -646,7 +646,7 @@
2619 }
2620
2621 /****************************************************************//**
2622-@@ -1589,14 +1643,16 @@
2623+@@ -1624,14 +1678,16 @@
2624 buf_pool_t* buf_pool = buf_pool_get(space, offset);
2625 ulint fold = buf_page_address_fold(space, offset);
2626
2627@@ -665,7 +665,7 @@
2628
2629 return(ret);
2630 }
2631-@@ -1613,13 +1669,15 @@
2632+@@ -1648,13 +1704,15 @@
2633 {
2634 buf_pool_t* buf_pool = buf_pool_from_bpage(bpage);
2635
2636@@ -683,7 +683,7 @@
2637 }
2638
2639 /********************************************************************//**
2640-@@ -1643,14 +1701,20 @@
2641+@@ -1678,14 +1736,20 @@
2642 ut_a(buf_page_in_file(bpage));
2643
2644 if (buf_page_peek_if_too_old(bpage)) {
2645@@ -708,7 +708,7 @@
2646 }
2647 }
2648
2649-@@ -1667,7 +1731,8 @@
2650+@@ -1702,7 +1766,8 @@
2651 buf_block_t* block;
2652 buf_pool_t* buf_pool = buf_pool_get(space, offset);
2653
2654@@ -718,7 +718,7 @@
2655
2656 block = (buf_block_t*) buf_page_hash_get(buf_pool, space, offset);
2657
2658-@@ -1676,7 +1741,8 @@
2659+@@ -1711,7 +1776,8 @@
2660 block->check_index_page_at_flush = FALSE;
2661 }
2662
2663@@ -728,7 +728,7 @@
2664 }
2665
2666 #if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
2667-@@ -1696,7 +1762,8 @@
2668+@@ -1731,7 +1797,8 @@
2669 buf_page_t* bpage;
2670 buf_pool_t* buf_pool = buf_pool_get(space, offset);
2671
2672@@ -738,7 +738,7 @@
2673
2674 bpage = buf_page_hash_get(buf_pool, space, offset);
2675
2676-@@ -1707,7 +1774,8 @@
2677+@@ -1742,7 +1809,8 @@
2678 bpage->file_page_was_freed = TRUE;
2679 }
2680
2681@@ -748,7 +748,7 @@
2682
2683 return(bpage);
2684 }
2685-@@ -1728,7 +1796,8 @@
2686+@@ -1763,7 +1831,8 @@
2687 buf_page_t* bpage;
2688 buf_pool_t* buf_pool = buf_pool_get(space, offset);
2689
2690@@ -758,7 +758,7 @@
2691
2692 bpage = buf_page_hash_get(buf_pool, space, offset);
2693
2694-@@ -1737,7 +1806,8 @@
2695+@@ -1772,7 +1841,8 @@
2696 bpage->file_page_was_freed = FALSE;
2697 }
2698
2699@@ -768,7 +768,7 @@
2700
2701 return(bpage);
2702 }
2703-@@ -1769,8 +1839,9 @@
2704+@@ -1804,8 +1874,9 @@
2705 buf_pool->stat.n_page_gets++;
2706
2707 for (;;) {
2708@@ -779,7 +779,7 @@
2709 bpage = buf_page_hash_get(buf_pool, space, offset);
2710 if (bpage) {
2711 ut_ad(!buf_pool_watch_is_sentinel(buf_pool, bpage));
2712-@@ -1779,7 +1850,8 @@
2713+@@ -1814,7 +1885,8 @@
2714
2715 /* Page not in buf_pool: needs to be read from file */
2716
2717@@ -789,7 +789,7 @@
2718
2719 buf_read_page(space, zip_size, offset);
2720
2721-@@ -1791,10 +1863,15 @@
2722+@@ -1826,10 +1898,15 @@
2723 if (UNIV_UNLIKELY(!bpage->zip.data)) {
2724 /* There is no compressed page. */
2725 err_exit:
2726@@ -806,7 +806,7 @@
2727 ut_ad(!buf_pool_watch_is_sentinel(buf_pool, bpage));
2728
2729 switch (buf_page_get_state(bpage)) {
2730-@@ -1803,24 +1880,43 @@
2731+@@ -1838,24 +1915,43 @@
2732 case BUF_BLOCK_MEMORY:
2733 case BUF_BLOCK_REMOVE_HASH:
2734 case BUF_BLOCK_ZIP_FREE:
2735@@ -855,7 +855,7 @@
2736 buf_block_buf_fix_inc((buf_block_t*) bpage,
2737 __FILE__, __LINE__);
2738 goto got_block;
2739-@@ -1833,7 +1929,7 @@
2740+@@ -1868,7 +1964,7 @@
2741 must_read = buf_page_get_io_fix(bpage) == BUF_IO_READ;
2742 access_time = buf_page_is_accessed(bpage);
2743
2744@@ -864,7 +864,7 @@
2745
2746 mutex_exit(block_mutex);
2747
2748-@@ -2144,7 +2240,7 @@
2749+@@ -2179,7 +2275,7 @@
2750 const buf_block_t* block) /*!< in: pointer to block,
2751 not dereferenced */
2752 {
2753@@ -873,7 +873,7 @@
2754
2755 if (UNIV_UNLIKELY((((ulint) block) % sizeof *block) != 0)) {
2756 /* The pointer should be aligned. */
2757-@@ -2180,6 +2276,7 @@
2758+@@ -2215,6 +2311,7 @@
2759 ulint fix_type;
2760 ibool must_read;
2761 ulint retries = 0;
2762@@ -881,7 +881,7 @@
2763 buf_pool_t* buf_pool = buf_pool_get(space, offset);
2764
2765 ut_ad(mtr);
2766-@@ -2213,18 +2310,24 @@
2767+@@ -2248,18 +2345,24 @@
2768 fold = buf_page_address_fold(space, offset);
2769 loop:
2770 block = guess;
2771@@ -908,7 +908,7 @@
2772 block = guess = NULL;
2773 } else {
2774 ut_ad(!block->page.in_zip_hash);
2775-@@ -2233,12 +2336,19 @@
2776+@@ -2268,12 +2371,19 @@
2777 }
2778
2779 if (block == NULL) {
2780@@ -928,7 +928,7 @@
2781 block = NULL;
2782 }
2783
2784-@@ -2250,12 +2360,14 @@
2785+@@ -2285,12 +2395,14 @@
2786 space, offset, fold);
2787
2788 if (UNIV_LIKELY_NULL(block)) {
2789@@ -945,7 +945,7 @@
2790
2791 if (mode == BUF_GET_IF_IN_POOL
2792 || mode == BUF_PEEK_IF_IN_POOL
2793-@@ -2308,7 +2420,8 @@
2794+@@ -2343,7 +2455,8 @@
2795 /* The page is being read to buffer pool,
2796 but we cannot wait around for the read to
2797 complete. */
2798@@ -955,7 +955,7 @@
2799
2800 return(NULL);
2801 }
2802-@@ -2318,38 +2431,49 @@
2803+@@ -2353,38 +2466,49 @@
2804 ibool success;
2805
2806 case BUF_BLOCK_FILE_PAGE:
2807@@ -1012,7 +1012,7 @@
2808
2809 {
2810 buf_page_t* hash_bpage;
2811-@@ -2362,35 +2486,47 @@
2812+@@ -2397,35 +2521,47 @@
2813 while buf_pool->mutex was released.
2814 Free the block that was allocated. */
2815
2816@@ -1066,7 +1066,7 @@
2817 buf_block_init_low(block);
2818 block->lock_hash_val = lock_rec_hash(space, offset);
2819
2820-@@ -2400,7 +2536,7 @@
2821+@@ -2435,7 +2571,7 @@
2822 if (buf_page_get_state(&block->page)
2823 == BUF_BLOCK_ZIP_PAGE) {
2824 #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
2825@@ -1075,7 +1075,7 @@
2826 &block->page);
2827 #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
2828 ut_ad(!block->page.in_flush_list);
2829-@@ -2418,18 +2554,23 @@
2830+@@ -2453,18 +2589,23 @@
2831 /* Insert at the front of unzip_LRU list */
2832 buf_unzip_LRU_add_block(block, FALSE);
2833
2834@@ -1101,7 +1101,7 @@
2835 buf_page_free_descriptor(bpage);
2836
2837 /* Decompress the page and apply buffered operations
2838-@@ -2443,12 +2584,15 @@
2839+@@ -2478,12 +2619,15 @@
2840 }
2841
2842 /* Unfix and unlatch the block. */
2843@@ -1120,7 +1120,7 @@
2844 rw_lock_x_unlock(&block->lock);
2845
2846 break;
2847-@@ -2464,7 +2608,7 @@
2848+@@ -2499,7 +2643,7 @@
2849
2850 ut_ad(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
2851
2852@@ -1129,7 +1129,7 @@
2853 #if UNIV_WORD_SIZE == 4
2854 /* On 32-bit systems, there is no padding in buf_page_t. On
2855 other systems, Valgrind could complain about uninitialized pad
2856-@@ -2477,8 +2621,8 @@
2857+@@ -2512,8 +2656,8 @@
2858 /* Try to evict the block from the buffer pool, to use the
2859 insert buffer (change buffer) as much as possible. */
2860
2861@@ -1140,7 +1140,7 @@
2862 if (mode == BUF_GET_IF_IN_POOL_OR_WATCH) {
2863 /* Set the watch, as it would have
2864 been set if the page were not in the
2865-@@ -2487,6 +2631,9 @@
2866+@@ -2522,6 +2666,9 @@
2867 space, offset, fold);
2868
2869 if (UNIV_LIKELY_NULL(block)) {
2870@@ -1150,7 +1150,7 @@
2871
2872 /* The page entered the buffer
2873 pool for some reason. Try to
2874-@@ -2494,7 +2641,7 @@
2875+@@ -2529,7 +2676,7 @@
2876 goto got_block;
2877 }
2878 }
2879@@ -1159,7 +1159,7 @@
2880 fprintf(stderr,
2881 "innodb_change_buffering_debug evict %u %u\n",
2882 (unsigned) space, (unsigned) offset);
2883-@@ -2516,13 +2663,14 @@
2884+@@ -2551,13 +2698,14 @@
2885 ut_a(mode == BUF_GET_POSSIBLY_FREED
2886 || !block->page.file_page_was_freed);
2887 #endif
2888@@ -1176,7 +1176,7 @@
2889
2890 if (UNIV_LIKELY(mode != BUF_PEEK_IF_IN_POOL)) {
2891 buf_page_set_accessed_make_young(&block->page, access_time);
2892-@@ -2755,9 +2903,11 @@
2893+@@ -2790,9 +2938,11 @@
2894 buf_pool = buf_pool_from_block(block);
2895
2896 if (mode == BUF_MAKE_YOUNG && buf_page_peek_if_too_old(&block->page)) {
2897@@ -1190,7 +1190,7 @@
2898 } else if (!buf_page_is_accessed(&block->page)) {
2899 /* Above, we do a dirty read on purpose, to avoid
2900 mutex contention. The field buf_page_t::access_time
2901-@@ -2765,9 +2915,11 @@
2902+@@ -2800,9 +2950,11 @@
2903 field must be protected by mutex, however. */
2904 ulint time_ms = ut_time_ms();
2905
2906@@ -1204,7 +1204,7 @@
2907 }
2908
2909 ut_ad(!ibuf_inside(mtr) || mode == BUF_KEEP_OLD);
2910-@@ -2834,18 +2986,21 @@
2911+@@ -2869,18 +3021,21 @@
2912 ut_ad(mtr);
2913 ut_ad(mtr->state == MTR_ACTIVE);
2914
2915@@ -1229,7 +1229,7 @@
2916
2917 #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
2918 ut_a(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
2919-@@ -2935,7 +3090,10 @@
2920+@@ -2970,7 +3125,10 @@
2921 buf_page_t* hash_page;
2922
2923 ut_ad(buf_pool == buf_pool_get(space, offset));
2924@@ -1241,7 +1241,7 @@
2925 ut_ad(mutex_own(&(block->mutex)));
2926 ut_a(buf_block_get_state(block) != BUF_BLOCK_FILE_PAGE);
2927
2928-@@ -2964,11 +3122,14 @@
2929+@@ -2999,11 +3157,14 @@
2930 if (UNIV_LIKELY(!hash_page)) {
2931 } else if (buf_pool_watch_is_sentinel(buf_pool, hash_page)) {
2932 /* Preserve the reference count. */
2933@@ -1257,7 +1257,7 @@
2934 } else {
2935 fprintf(stderr,
2936 "InnoDB: Error: page %lu %lu already found"
2937-@@ -2978,7 +3139,8 @@
2938+@@ -3013,7 +3174,8 @@
2939 (const void*) hash_page, (const void*) block);
2940 #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
2941 mutex_exit(&block->mutex);
2942@@ -1267,7 +1267,7 @@
2943 buf_print();
2944 buf_LRU_print();
2945 buf_validate();
2946-@@ -3061,7 +3223,9 @@
2947+@@ -3096,7 +3258,9 @@
2948
2949 fold = buf_page_address_fold(space, offset);
2950
2951@@ -1278,7 +1278,7 @@
2952
2953 watch_page = buf_page_hash_get_low(buf_pool, space, offset, fold);
2954 if (watch_page && !buf_pool_watch_is_sentinel(buf_pool, watch_page)) {
2955-@@ -3070,9 +3234,15 @@
2956+@@ -3105,9 +3269,15 @@
2957 err_exit:
2958 if (block) {
2959 mutex_enter(&block->mutex);
2960@@ -1295,7 +1295,7 @@
2961
2962 bpage = NULL;
2963 goto func_exit;
2964-@@ -3095,6 +3265,8 @@
2965+@@ -3130,6 +3300,8 @@
2966
2967 buf_page_init(buf_pool, space, offset, fold, block);
2968
2969@@ -1304,7 +1304,7 @@
2970 /* The block must be put to the LRU list, to the old blocks */
2971 buf_LRU_add_block(bpage, TRUE/* to old blocks */);
2972
2973-@@ -3122,7 +3294,7 @@
2974+@@ -3157,7 +3329,7 @@
2975 been added to buf_pool->LRU and
2976 buf_pool->page_hash. */
2977 mutex_exit(&block->mutex);
2978@@ -1313,7 +1313,7 @@
2979 mutex_enter(&block->mutex);
2980 block->page.zip.data = data;
2981
2982-@@ -3135,13 +3307,14 @@
2983+@@ -3170,13 +3342,14 @@
2984 buf_unzip_LRU_add_block(block, TRUE);
2985 }
2986
2987@@ -1329,7 +1329,7 @@
2988
2989 /* If buf_buddy_alloc() allocated storage from the LRU list,
2990 it released and reacquired buf_pool->mutex. Thus, we must
2991-@@ -3157,7 +3330,10 @@
2992+@@ -3192,7 +3365,10 @@
2993
2994 /* The block was added by some other thread. */
2995 watch_page = NULL;
2996@@ -1341,7 +1341,7 @@
2997
2998 bpage = NULL;
2999 goto func_exit;
3000-@@ -3205,20 +3381,26 @@
3001+@@ -3240,20 +3416,26 @@
3002 HASH_INSERT(buf_page_t, hash, buf_pool->page_hash, fold,
3003 bpage);
3004
3005@@ -1369,7 +1369,7 @@
3006
3007 if (mode == BUF_READ_IBUF_PAGES_ONLY) {
3008
3009-@@ -3260,7 +3442,9 @@
3010+@@ -3295,7 +3477,9 @@
3011
3012 fold = buf_page_address_fold(space, offset);
3013
3014@@ -1380,7 +1380,7 @@
3015
3016 block = (buf_block_t*) buf_page_hash_get_low(
3017 buf_pool, space, offset, fold);
3018-@@ -3276,7 +3460,9 @@
3019+@@ -3311,7 +3495,9 @@
3020 #endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */
3021
3022 /* Page can be found in buf_pool */
3023@@ -1391,7 +1391,7 @@
3024
3025 buf_block_free(free_block);
3026
3027-@@ -3298,6 +3484,7 @@
3028+@@ -3333,6 +3519,7 @@
3029 mutex_enter(&block->mutex);
3030
3031 buf_page_init(buf_pool, space, offset, fold, block);
3032@@ -1399,7 +1399,7 @@
3033
3034 /* The block must be put to the LRU list */
3035 buf_LRU_add_block(&block->page, FALSE);
3036-@@ -3324,7 +3511,7 @@
3037+@@ -3359,7 +3546,7 @@
3038 the reacquisition of buf_pool->mutex. We also must
3039 defer this operation until after the block descriptor
3040 has been added to buf_pool->LRU and buf_pool->page_hash. */
3041@@ -1408,7 +1408,7 @@
3042 mutex_enter(&block->mutex);
3043 block->page.zip.data = data;
3044
3045-@@ -3342,7 +3529,8 @@
3046+@@ -3377,7 +3564,8 @@
3047
3048 buf_page_set_accessed(&block->page, time_ms);
3049
3050@@ -1418,7 +1418,7 @@
3051
3052 mtr_memo_push(mtr, block, MTR_MEMO_BUF_FIX);
3053
3054-@@ -3397,7 +3585,9 @@
3055+@@ -3432,7 +3620,9 @@
3056 ibool ret = TRUE;
3057
3058 /* First unfix and release lock on the bpage */
3059@@ -1429,7 +1429,7 @@
3060 mutex_enter(buf_page_get_mutex(bpage));
3061 ut_ad(buf_page_get_io_fix(bpage) == BUF_IO_READ);
3062 ut_ad(bpage->buf_fix_count == 0);
3063-@@ -3418,11 +3608,15 @@
3064+@@ -3453,11 +3643,15 @@
3065 ret = FALSE;
3066 }
3067
3068@@ -1446,7 +1446,7 @@
3069
3070 return(ret);
3071 }
3072-@@ -3440,6 +3634,8 @@
3073+@@ -3475,6 +3669,8 @@
3074 buf_pool_t* buf_pool = buf_pool_from_bpage(bpage);
3075 const ibool uncompressed = (buf_page_get_state(bpage)
3076 == BUF_BLOCK_FILE_PAGE);
3077@@ -1455,7 +1455,7 @@
3078
3079 ut_a(buf_page_in_file(bpage));
3080
3081-@@ -3582,8 +3778,26 @@
3082+@@ -3617,8 +3813,26 @@
3083 }
3084 }
3085
3086@@ -1483,7 +1483,7 @@
3087
3088 #ifdef UNIV_IBUF_COUNT_DEBUG
3089 if (io_type == BUF_IO_WRITE || uncompressed) {
3090-@@ -3606,6 +3820,7 @@
3091+@@ -3641,6 +3855,7 @@
3092 the x-latch to this OS thread: do not let this confuse you in
3093 debugging! */
3094
3095@@ -1491,7 +1491,7 @@
3096 ut_ad(buf_pool->n_pend_reads > 0);
3097 buf_pool->n_pend_reads--;
3098 buf_pool->stat.n_pages_read++;
3099-@@ -3623,6 +3838,9 @@
3100+@@ -3658,6 +3873,9 @@
3101
3102 buf_flush_write_complete(bpage);
3103
3104@@ -1501,7 +1501,7 @@
3105 if (uncompressed) {
3106 rw_lock_s_unlock_gen(&((buf_block_t*) bpage)->lock,
3107 BUF_IO_WRITE);
3108-@@ -3645,8 +3863,8 @@
3109+@@ -3680,8 +3898,8 @@
3110 }
3111 #endif /* UNIV_DEBUG */
3112
3113@@ -1511,7 +1511,7 @@
3114 }
3115
3116 /*********************************************************************//**
3117-@@ -3663,7 +3881,9 @@
3118+@@ -3698,7 +3916,9 @@
3119
3120 ut_ad(buf_pool);
3121
3122@@ -1522,7 +1522,7 @@
3123
3124 chunk = buf_pool->chunks;
3125
3126-@@ -3680,7 +3900,9 @@
3127+@@ -3715,7 +3935,9 @@
3128 }
3129 }
3130
3131@@ -1533,7 +1533,7 @@
3132
3133 return(TRUE);
3134 }
3135-@@ -3728,7 +3950,8 @@
3136+@@ -3763,7 +3985,8 @@
3137 freed = buf_LRU_search_and_free_block(buf_pool, 100);
3138 }
3139
3140@@ -1543,7 +1543,7 @@
3141
3142 ut_ad(UT_LIST_GET_LEN(buf_pool->LRU) == 0);
3143 ut_ad(UT_LIST_GET_LEN(buf_pool->unzip_LRU) == 0);
3144-@@ -3741,7 +3964,8 @@
3145+@@ -3776,7 +3999,8 @@
3146 memset(&buf_pool->stat, 0x00, sizeof(buf_pool->stat));
3147 buf_refresh_io_stats(buf_pool);
3148
3149@@ -1553,7 +1553,7 @@
3150 }
3151
3152 /*********************************************************************//**
3153-@@ -3783,7 +4007,10 @@
3154+@@ -3818,7 +4042,10 @@
3155
3156 ut_ad(buf_pool);
3157
3158@@ -1565,7 +1565,7 @@
3159
3160 chunk = buf_pool->chunks;
3161
3162-@@ -3878,7 +4105,7 @@
3163+@@ -3913,7 +4140,7 @@
3164 /* Check clean compressed-only blocks. */
3165
3166 for (b = UT_LIST_GET_FIRST(buf_pool->zip_clean); b;
3167@@ -1574,7 +1574,7 @@
3168 ut_a(buf_page_get_state(b) == BUF_BLOCK_ZIP_PAGE);
3169 switch (buf_page_get_io_fix(b)) {
3170 case BUF_IO_NONE:
3171-@@ -3909,7 +4136,7 @@
3172+@@ -3944,7 +4171,7 @@
3173
3174 buf_flush_list_mutex_enter(buf_pool);
3175 for (b = UT_LIST_GET_FIRST(buf_pool->flush_list); b;
3176@@ -1583,7 +1583,7 @@
3177 ut_ad(b->in_flush_list);
3178 ut_a(b->oldest_modification);
3179 n_flush++;
3180-@@ -3968,6 +4195,8 @@
3181+@@ -4003,6 +4230,8 @@
3182 }
3183
3184 ut_a(UT_LIST_GET_LEN(buf_pool->LRU) == n_lru);
3185@@ -1592,7 +1592,7 @@
3186 if (UT_LIST_GET_LEN(buf_pool->free) != n_free) {
3187 fprintf(stderr, "Free list len %lu, free blocks %lu\n",
3188 (ulong) UT_LIST_GET_LEN(buf_pool->free),
3189-@@ -3978,8 +4207,11 @@
3190+@@ -4013,8 +4242,11 @@
3191 ut_a(buf_pool->n_flush[BUF_FLUSH_SINGLE_PAGE] == n_single_flush);
3192 ut_a(buf_pool->n_flush[BUF_FLUSH_LIST] == n_list_flush);
3193 ut_a(buf_pool->n_flush[BUF_FLUSH_LRU] == n_lru_flush);
3194@@ -1605,7 +1605,7 @@
3195
3196 ut_a(buf_LRU_validate());
3197 ut_a(buf_flush_validate(buf_pool));
3198-@@ -4035,7 +4267,9 @@
3199+@@ -4070,7 +4302,9 @@
3200 index_ids = mem_alloc(size * sizeof *index_ids);
3201 counts = mem_alloc(sizeof(ulint) * size);
3202
3203@@ -1616,7 +1616,7 @@
3204 buf_flush_list_mutex_enter(buf_pool);
3205
3206 fprintf(stderr,
3207-@@ -4104,7 +4338,9 @@
3208+@@ -4139,7 +4373,9 @@
3209 }
3210 }
3211
3212@@ -1627,7 +1627,7 @@
3213
3214 for (i = 0; i < n_found; i++) {
3215 index = dict_index_get_if_in_cache(index_ids[i]);
3216-@@ -4161,7 +4397,7 @@
3217+@@ -4196,7 +4432,7 @@
3218 buf_chunk_t* chunk;
3219 ulint fixed_pages_number = 0;
3220
3221@@ -1636,7 +1636,7 @@
3222
3223 chunk = buf_pool->chunks;
3224
3225-@@ -4195,7 +4431,7 @@
3226+@@ -4230,7 +4466,7 @@
3227 /* Traverse the lists of clean and dirty compressed-only blocks. */
3228
3229 for (b = UT_LIST_GET_FIRST(buf_pool->zip_clean); b;
3230@@ -1645,7 +1645,7 @@
3231 ut_a(buf_page_get_state(b) == BUF_BLOCK_ZIP_PAGE);
3232 ut_a(buf_page_get_io_fix(b) != BUF_IO_WRITE);
3233
3234-@@ -4207,7 +4443,7 @@
3235+@@ -4242,7 +4478,7 @@
3236
3237 buf_flush_list_mutex_enter(buf_pool);
3238 for (b = UT_LIST_GET_FIRST(buf_pool->flush_list); b;
3239@@ -1654,7 +1654,7 @@
3240 ut_ad(b->in_flush_list);
3241
3242 switch (buf_page_get_state(b)) {
3243-@@ -4233,7 +4469,7 @@
3244+@@ -4268,7 +4504,7 @@
3245
3246 buf_flush_list_mutex_exit(buf_pool);
3247 mutex_exit(&buf_pool->zip_mutex);
3248@@ -1663,7 +1663,7 @@
3249
3250 return(fixed_pages_number);
3251 }
3252-@@ -4391,6 +4627,8 @@
3253+@@ -4426,6 +4662,8 @@
3254 /* Find appropriate pool_info to store stats for this buffer pool */
3255 pool_info = &all_pool_info[pool_id];
3256
3257@@ -1672,7 +1672,7 @@
3258 buf_pool_mutex_enter(buf_pool);
3259 buf_flush_list_mutex_enter(buf_pool);
3260
3261-@@ -4506,6 +4744,8 @@
3262+@@ -4541,6 +4779,8 @@
3263 pool_info->unzip_cur = buf_LRU_stat_cur.unzip;
3264
3265 buf_refresh_io_stats(buf_pool);
3266@@ -1681,7 +1681,7 @@
3267 buf_pool_mutex_exit(buf_pool);
3268 }
3269
3270-@@ -4750,11 +4990,13 @@
3271+@@ -4785,11 +5025,13 @@
3272 {
3273 ulint len;
3274
3275@@ -3149,7 +3149,7 @@
3276 break;
3277 --- a/storage/innobase/ibuf/ibuf0ibuf.c
3278 +++ b/storage/innobase/ibuf/ibuf0ibuf.c
3279-@@ -3821,9 +3821,11 @@
3280+@@ -3760,9 +3760,11 @@
3281 ulint fold = buf_page_address_fold(space, page_no);
3282 buf_pool_t* buf_pool = buf_pool_get(space, page_no);
3283
3284
3285=== modified file 'patches/innodb_stats.patch'
3286--- patches/innodb_stats.patch 2011-12-16 09:37:26 +0000
3287+++ patches/innodb_stats.patch 2011-12-29 02:23:24 +0000
3288@@ -278,16 +278,10 @@
3289 }
3290
3291 if (node->state == INDEX_CREATE_INDEX_TREE) {
3292-@@ -1177,6 +1316,66 @@
3293- return(NULL);
3294- }
3295+@@ -1183,6 +1322,66 @@
3296+ }
3297
3298-+ thr->run_node = que_node_get_parent(node);
3299-+
3300-+ return(thr);
3301-+}
3302-+
3303-+/****************************************************************//**
3304+ /****************************************************************//**
3305 +*/
3306 +UNIV_INTERN
3307 +que_thr_t*
3308@@ -342,9 +336,15 @@
3309 + return(NULL);
3310 + }
3311 +
3312- thr->run_node = que_node_get_parent(node);
3313-
3314- return(thr);
3315++ thr->run_node = que_node_get_parent(node);
3316++
3317++ return(thr);
3318++}
3319++
3320++/****************************************************************//**
3321+ Creates the foreign key constraints system tables inside InnoDB
3322+ at database creation or database start if they are not found or are
3323+ not of the right form.
3324 --- a/storage/innobase/dict/dict0dict.c
3325 +++ b/storage/innobase/dict/dict0dict.c
3326 @@ -755,7 +755,7 @@
3327@@ -927,7 +927,7 @@
3328 /* Handle duplicate key errors */
3329 if (auto_inc_used) {
3330 ulint err;
3331-@@ -5593,6 +5600,10 @@
3332+@@ -5591,6 +5598,10 @@
3333 }
3334 }
3335
3336@@ -938,7 +938,7 @@
3337 innodb_srv_conc_exit_innodb(trx);
3338
3339 error = convert_error_code_to_mysql(error,
3340-@@ -5646,6 +5657,10 @@
3341+@@ -5644,6 +5655,10 @@
3342
3343 error = row_update_for_mysql((byte*) record, prebuilt);
3344
3345@@ -949,7 +949,7 @@
3346 innodb_srv_conc_exit_innodb(trx);
3347
3348 error = convert_error_code_to_mysql(
3349-@@ -5966,6 +5981,11 @@
3350+@@ -5965,6 +5980,11 @@
3351 case DB_SUCCESS:
3352 error = 0;
3353 table->status = 0;
3354@@ -961,7 +961,7 @@
3355 break;
3356 case DB_RECORD_NOT_FOUND:
3357 error = HA_ERR_KEY_NOT_FOUND;
3358-@@ -6198,6 +6218,11 @@
3359+@@ -6197,6 +6217,11 @@
3360 case DB_SUCCESS:
3361 error = 0;
3362 table->status = 0;
3363@@ -973,7 +973,7 @@
3364 break;
3365 case DB_RECORD_NOT_FOUND:
3366 error = HA_ERR_END_OF_FILE;
3367-@@ -8144,11 +8169,35 @@
3368+@@ -8150,11 +8175,35 @@
3369 /* In sql_show we call with this flag: update
3370 then statistics so that they are up-to-date */
3371
3372@@ -1010,7 +1010,7 @@
3373
3374 prebuilt->trx->op_info = "returning various info to MySQL";
3375 }
3376-@@ -8233,7 +8282,7 @@
3377+@@ -8239,7 +8288,7 @@
3378 are asked by MySQL to avoid locking. Another reason to
3379 avoid the call is that it uses quite a lot of CPU.
3380 See Bug#38185. */
3381@@ -1019,7 +1019,7 @@
3382 || !(flag & HA_STATUS_VARIABLE_EXTRA)) {
3383 /* We do not update delete_length if no
3384 locking is requested so the "old" value can
3385-@@ -11503,6 +11552,26 @@
3386+@@ -11512,6 +11561,26 @@
3387 "The number of index pages to sample when calculating statistics (default 8)",
3388 NULL, NULL, 8, 1, ~0ULL, 0);
3389
3390@@ -1046,7 +1046,7 @@
3391 static MYSQL_SYSVAR_BOOL(adaptive_hash_index, btr_search_enabled,
3392 PLUGIN_VAR_OPCMDARG,
3393 "Enable InnoDB adaptive hash index (enabled by default). "
3394-@@ -11835,6 +11904,9 @@
3395+@@ -11844,6 +11913,9 @@
3396 MYSQL_SYSVAR(recovery_update_relay_log),
3397 MYSQL_SYSVAR(rollback_on_timeout),
3398 MYSQL_SYSVAR(stats_on_metadata),
3399@@ -1056,7 +1056,7 @@
3400 MYSQL_SYSVAR(stats_sample_pages),
3401 MYSQL_SYSVAR(adaptive_hash_index),
3402 MYSQL_SYSVAR(stats_method),
3403-@@ -11906,7 +11978,10 @@
3404+@@ -11915,7 +11987,10 @@
3405 i_s_innodb_sys_columns,
3406 i_s_innodb_sys_fields,
3407 i_s_innodb_sys_foreign,
3408@@ -1306,7 +1306,7 @@
3409 static ST_FIELD_INFO i_s_innodb_rseg_fields_info[] =
3410 @@ -3677,3 +3897,349 @@
3411 /* unsigned long */
3412- STRUCT_FLD(flags, 0UL)
3413+ STRUCT_FLD(flags, 0UL),
3414 };
3415 +
3416 +/***********************************************************************
3417
3418=== modified file 'patches/innodb_thread_concurrency_timer_based.patch'
3419--- patches/innodb_thread_concurrency_timer_based.patch 2011-12-13 15:06:50 +0000
3420+++ patches/innodb_thread_concurrency_timer_based.patch 2011-12-29 02:23:24 +0000
3421@@ -25,7 +25,7 @@
3422 #ifdef UNIV_LOG_ARCHIVE
3423 srv_log_archive_on = (ulint) innobase_log_archive;
3424 #endif /* UNIV_LOG_ARCHIVE */
3425-@@ -11593,6 +11597,12 @@
3426+@@ -11602,6 +11606,12 @@
3427 "Maximum delay between polling for a spin lock (6 by default)",
3428 NULL, NULL, 6L, 0L, ~0L, 0);
3429
3430@@ -38,7 +38,7 @@
3431 static MYSQL_SYSVAR_ULONG(thread_concurrency, srv_thread_concurrency,
3432 PLUGIN_VAR_RQCMDARG,
3433 "Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling.",
3434-@@ -11811,6 +11821,7 @@
3435+@@ -11820,6 +11830,7 @@
3436 MYSQL_SYSVAR(spin_wait_delay),
3437 MYSQL_SYSVAR(table_locks),
3438 MYSQL_SYSVAR(thread_concurrency),
3439
3440=== modified file 'patches/log_warnings_suppress.patch'
3441--- patches/log_warnings_suppress.patch 2011-12-13 13:49:04 +0000
3442+++ patches/log_warnings_suppress.patch 2011-12-29 02:23:24 +0000
3443@@ -41,7 +41,7 @@
3444 using my_pthread_setspecific_ptr()/my_thread_getspecific_ptr().
3445 --- a/sql/sql_class.cc
3446 +++ b/sql/sql_class.cc
3447-@@ -4931,7 +4931,7 @@
3448+@@ -5024,7 +5024,7 @@
3449 ER_BINLOG_UNSAFE_STATEMENT,
3450 ER(ER_BINLOG_UNSAFE_STATEMENT),
3451 ER(LEX::binlog_stmt_unsafe_errcode[unsafe_type]));
3452@@ -52,7 +52,7 @@
3453 sprintf(buf, ER(ER_BINLOG_UNSAFE_STATEMENT),
3454 --- a/sql/sql_class.h
3455 +++ b/sql/sql_class.h
3456-@@ -90,6 +90,7 @@
3457+@@ -87,6 +87,7 @@
3458 SLOG_F_TMP_TABLE, SLOG_F_TMP_DISK, SLOG_F_FILESORT,
3459 SLOG_F_FILESORT_DISK
3460 };
3461@@ -62,7 +62,7 @@
3462 SLAVE_EXEC_MODE_LAST_BIT};
3463 --- a/sql/sys_vars.cc
3464 +++ b/sql/sys_vars.cc
3465-@@ -1493,6 +1493,15 @@
3466+@@ -1499,6 +1499,15 @@
3467 READ_ONLY GLOBAL_VAR(mysqld_port), CMD_LINE(REQUIRED_ARG, 'P'),
3468 VALID_RANGE(0, UINT_MAX32), DEFAULT(0), BLOCK_SIZE(1));
3469
3470@@ -178,7 +178,7 @@
3471 --long-query-time=# Log all queries that have taken more than long_query_time
3472 seconds to execute to file. The argument will be treated
3473 as a decimal value with microsecond precision
3474-@@ -863,6 +866,7 @@
3475+@@ -865,6 +868,7 @@
3476 log-tc tc.log
3477 log-tc-size 24576
3478 log-warnings 1
3479
3480=== modified file 'patches/mysql-test.diff'
3481--- patches/mysql-test.diff 2011-12-13 13:49:04 +0000
3482+++ patches/mysql-test.diff 2011-12-29 02:23:24 +0000
3483@@ -1049,7 +1049,7 @@
3484 +SELECT Variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES ORDER BY 1;
3485 --- /dev/null
3486 +++ b/mysql-test/r/percona_server_variables_debug.result
3487-@@ -0,0 +1,380 @@
3488+@@ -0,0 +1,381 @@
3489 +SELECT Variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES ORDER BY 1;
3490 +Variable_name
3491 +AUTOCOMMIT
3492@@ -1280,6 +1280,7 @@
3493 +MAX_TMP_TABLES
3494 +MAX_USER_CONNECTIONS
3495 +MAX_WRITE_LOCK_COUNT
3496++METADATA_LOCKS_CACHE_SIZE
3497 +MIN_EXAMINED_ROW_LIMIT
3498 +MULTI_RANGE_COUNT
3499 +MYISAM_DATA_POINTER_SIZE
3500@@ -1432,7 +1433,7 @@
3501 +WARNING_COUNT
3502 --- /dev/null
3503 +++ b/mysql-test/r/percona_server_variables_release.result
3504-@@ -0,0 +1,376 @@
3505+@@ -0,0 +1,377 @@
3506 +SELECT Variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES ORDER BY 1;
3507 +Variable_name
3508 +AUTOCOMMIT
3509@@ -1660,6 +1661,7 @@
3510 +MAX_TMP_TABLES
3511 +MAX_USER_CONNECTIONS
3512 +MAX_WRITE_LOCK_COUNT
3513++METADATA_LOCKS_CACHE_SIZE
3514 +MIN_EXAMINED_ROW_LIMIT
3515 +MULTI_RANGE_COUNT
3516 +MYISAM_DATA_POINTER_SIZE
3517@@ -1819,3 +1821,7 @@
3518 @@ -0,0 +1,2 @@
3519 +--source include/have_nodebug.inc
3520 +--source include/percona_server_variables.inc
3521+--- a/mysql-test/suite/innodb/t/innodb_cmp_drop_table-master.opt
3522++++ /dev/null
3523+@@ -1 +0,0 @@
3524+---innodb-buffer-pool-size=8M
3525
3526=== modified file 'patches/optimizer_fix.patch'
3527--- patches/optimizer_fix.patch 2011-08-09 20:52:20 +0000
3528+++ patches/optimizer_fix.patch 2011-12-29 02:23:24 +0000
3529@@ -138,7 +138,7 @@
3530 DBUG_RETURN(HA_POS_ERROR); /* This shouldn't happend */
3531 --- a/sql/sys_vars.cc
3532 +++ b/sql/sys_vars.cc
3533-@@ -2180,6 +2180,12 @@
3534+@@ -2186,6 +2186,12 @@
3535 VALID_RANGE(1, IF_WIN(INT_MAX32/1000, LONG_TIMEOUT)),
3536 DEFAULT(NET_WAIT_TIMEOUT), BLOCK_SIZE(1));
3537
3538
3539=== modified file 'patches/processlist_row_stats.patch'
3540--- patches/processlist_row_stats.patch 2011-12-13 13:49:04 +0000
3541+++ patches/processlist_row_stats.patch 2011-12-29 02:23:24 +0000
3542@@ -7,7 +7,7 @@
3543 # should be done or reviewed by the maintainer!
3544 --- a/sql/sql_class.cc
3545 +++ b/sql/sql_class.cc
3546-@@ -2326,6 +2326,7 @@
3547+@@ -2419,6 +2419,7 @@
3548
3549 thd->sent_row_count++;
3550 thd->sent_row_count_2++;
3551
3552=== modified file 'patches/query_cache_enhance.patch'
3553--- patches/query_cache_enhance.patch 2011-12-16 09:37:26 +0000
3554+++ patches/query_cache_enhance.patch 2011-12-29 02:23:24 +0000
3555@@ -542,7 +542,7 @@
3556 #ifdef EMBEDDED_LIBRARY
3557 #include "emb_qcache.h"
3558 #endif
3559-@@ -454,7 +939,12 @@
3560+@@ -454,7 +944,12 @@
3561 Query_cache_wait_state wait_state(thd, __func__, __FILE__, __LINE__);
3562 DBUG_ENTER("Query_cache::try_lock");
3563
3564@@ -555,7 +555,7 @@
3565 while (1)
3566 {
3567 if (m_cache_lock_status == Query_cache::UNLOCKED)
3568-@@ -1274,6 +1764,8 @@
3569+@@ -1274,6 +1769,8 @@
3570 unlock();
3571 DBUG_VOID_RETURN;
3572 }
3573@@ -564,7 +564,7 @@
3574
3575 /* Key is query + database + flag */
3576 if (thd->db_length)
3577-@@ -1440,7 +1932,7 @@
3578+@@ -1440,7 +1937,7 @@
3579 */
3580
3581 int
3582@@ -573,7 +573,7 @@
3583 {
3584 ulonglong engine_data;
3585 Query_cache_query *query;
3586-@@ -1452,6 +1944,11 @@
3587+@@ -1452,6 +1949,11 @@
3588 ulong tot_length;
3589 Query_cache_query_flags flags;
3590 DBUG_ENTER("Query_cache::send_result_to_client");
3591@@ -585,7 +585,7 @@
3592
3593 /*
3594 Testing 'query_cache_size' without a lock here is safe: the thing
3595-@@ -1471,13 +1968,7 @@
3596+@@ -1471,13 +1973,7 @@
3597 }
3598
3599 {
3600@@ -600,7 +600,7 @@
3601
3602 /*
3603 Test if the query is a SELECT
3604-@@ -1487,10 +1978,11 @@
3605+@@ -1487,10 +1983,11 @@
3606 frequently appeared in real life, consequently we can
3607 check all such queries, too.
3608 */
3609@@ -616,7 +616,7 @@
3610 {
3611 DBUG_PRINT("qcache", ("The statement is not a SELECT; Not cached"));
3612 goto err;
3613-@@ -1543,6 +2035,7 @@
3614+@@ -1543,6 +2040,7 @@
3615 goto err_unlock;
3616
3617 Query_cache_block *query_block;
3618@@ -624,7 +624,7 @@
3619
3620 tot_length= query_length + 1 + sizeof(size_t) +
3621 thd->db_length + QUERY_CACHE_FLAGS_SIZE;
3622-@@ -1611,6 +2104,7 @@
3623+@@ -1611,6 +2109,7 @@
3624 (uchar*) &flags, QUERY_CACHE_FLAGS_SIZE);
3625 query_block = (Query_cache_block *) my_hash_search(&queries, (uchar*) sql,
3626 tot_length);
3627@@ -634,7 +634,7 @@
3628 query_block->query()->result() == 0 ||
3629 --- a/sql/sql_class.h
3630 +++ b/sql/sql_class.h
3631-@@ -1487,6 +1487,74 @@
3632+@@ -1485,6 +1485,74 @@
3633
3634 extern "C" void my_message_sql(uint error, const char *str, myf MyFlags);
3635
3636@@ -709,7 +709,7 @@
3637 /**
3638 @class THD
3639 For each client connection we create a separate thread with THD serving as
3640-@@ -1544,6 +1612,7 @@
3641+@@ -1542,6 +1610,7 @@
3642 struct st_mysql_stmt *current_stmt;
3643 #endif
3644 #ifdef HAVE_QUERY_CACHE
3645@@ -719,7 +719,7 @@
3646 NET net; // client connection descriptor
3647 --- a/sql/sys_vars.cc
3648 +++ b/sql/sys_vars.cc
3649-@@ -1809,6 +1809,11 @@
3650+@@ -1815,6 +1815,11 @@
3651 NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
3652 ON_UPDATE(fix_query_cache_size));
3653
3654@@ -3735,7 +3735,7 @@
3655 +SET GLOBAL query_cache_size=0;
3656 --- a/mysql-test/r/mysqld--help-notwin.result
3657 +++ b/mysql-test/r/mysqld--help-notwin.result
3658-@@ -491,6 +491,10 @@
3659+@@ -493,6 +493,10 @@
3660 The minimum size for blocks allocated by the query cache
3661 --query-cache-size=#
3662 The memory allocated to store results from old queries
3663@@ -3746,7 +3746,7 @@
3664 --query-cache-type=name
3665 OFF = Don't cache or retrieve results. ON = Cache all
3666 results except SELECT SQL_NO_CACHE ... queries. DEMAND =
3667-@@ -928,6 +932,7 @@
3668+@@ -931,6 +935,7 @@
3669 query-cache-limit 1048576
3670 query-cache-min-res-unit 4096
3671 query-cache-size 0
3672
3673=== modified file 'patches/response_time_distribution.patch'
3674--- patches/response_time_distribution.patch 2011-12-14 11:42:46 +0000
3675+++ patches/response_time_distribution.patch 2011-12-29 02:23:24 +0000
3676@@ -3533,7 +3533,7 @@
3677 /*
3678 This forward declaration is needed because including sql_base.h
3679 causes further includes. [TODO] Eliminate this forward declaration
3680-@@ -1860,6 +1861,26 @@
3681+@@ -1866,6 +1867,26 @@
3682 DEFAULT(FALSE));
3683 #endif /* HAVE_QUERY_CACHE */
3684
3685@@ -3609,7 +3609,7 @@
3686 /*
3687 --- a/mysql-test/r/mysqld--help-notwin.result
3688 +++ b/mysql-test/r/mysqld--help-notwin.result
3689-@@ -503,6 +503,12 @@
3690+@@ -505,6 +505,12 @@
3691 Invalidate queries in query cache on LOCK for write
3692 --query-prealloc-size=#
3693 Persistent buffer for query parsing and execution
3694@@ -3622,7 +3622,7 @@
3695 --range-alloc-block-size=#
3696 Allocation block size for storing ranges during
3697 optimization
3698-@@ -936,6 +942,8 @@
3699+@@ -939,6 +945,8 @@
3700 query-cache-type ON
3701 query-cache-wlock-invalidate FALSE
3702 query-prealloc-size 8192
3703
3704=== modified file 'patches/show_temp.patch'
3705--- patches/show_temp.patch 2011-12-05 08:45:03 +0000
3706+++ patches/show_temp.patch 2011-12-29 02:23:24 +0000
3707@@ -506,7 +506,7 @@
3708 #endif
3709 --- a/sql/sql_class.h
3710 +++ b/sql/sql_class.h
3711-@@ -1004,6 +1004,11 @@
3712+@@ -1002,6 +1002,11 @@
3713 XXX Why are internal temporary tables added to this list?
3714 */
3715 TABLE *temporary_tables;
3716
3717=== modified file 'patches/slow_extended.patch'
3718--- patches/slow_extended.patch 2011-12-13 15:06:50 +0000
3719+++ patches/slow_extended.patch 2011-12-29 02:23:24 +0000
3720@@ -382,7 +382,7 @@
3721 const char *user_host, uint user_host_len,
3722 ulonglong query_utime, ulonglong lock_utime, bool is_command,
3723 const char *sql_text, uint sql_text_len);
3724-@@ -515,7 +515,7 @@
3725+@@ -517,7 +517,7 @@
3726 virtual bool init()= 0;
3727 virtual void cleanup()= 0;
3728
3729@@ -391,7 +391,7 @@
3730 time_t query_start_arg, const char *user_host,
3731 uint user_host_len, ulonglong query_utime,
3732 ulonglong lock_utime, bool is_command,
3733-@@ -544,7 +544,7 @@
3734+@@ -546,7 +546,7 @@
3735 virtual bool init();
3736 virtual void cleanup();
3737
3738@@ -400,7 +400,7 @@
3739 time_t query_start_arg, const char *user_host,
3740 uint user_host_len, ulonglong query_utime,
3741 ulonglong lock_utime, bool is_command,
3742-@@ -576,7 +576,7 @@
3743+@@ -578,7 +578,7 @@
3744 virtual bool init();
3745 virtual void cleanup();
3746
3747@@ -484,7 +484,7 @@
3748 mysql_mutex_lock(&LOCK_thread_count);
3749 --- a/sql/sp_head.cc
3750 +++ b/sql/sp_head.cc
3751-@@ -2152,7 +2152,7 @@
3752+@@ -2164,7 +2164,7 @@
3753 DBUG_PRINT("info",(" %.*s: eval args done", (int) m_name.length,
3754 m_name.str));
3755 }
3756@@ -495,7 +495,7 @@
3757 save_enable_slow_log= true;
3758 --- a/sql/sql_cache.cc
3759 +++ b/sql/sql_cache.cc
3760-@@ -1756,6 +1756,7 @@
3761+@@ -1780,6 +1780,7 @@
3762 response, we can't handle it anyway.
3763 */
3764 (void) trans_commit_stmt(thd);
3765@@ -503,7 +503,7 @@
3766 if (!thd->stmt_da->is_set())
3767 thd->stmt_da->disable_status();
3768
3769-@@ -1766,6 +1767,7 @@
3770+@@ -1790,6 +1791,7 @@
3771 err_unlock:
3772 unlock();
3773 err:
3774@@ -717,7 +717,7 @@
3775 enum enum_slave_exec_mode { SLAVE_EXEC_MODE_STRICT,
3776 SLAVE_EXEC_MODE_IDEMPOTENT,
3777 SLAVE_EXEC_MODE_LAST_BIT};
3778-@@ -508,6 +535,21 @@
3779+@@ -506,6 +533,21 @@
3780
3781 my_bool sysdate_is_now;
3782
3783@@ -739,7 +739,7 @@
3784 double long_query_time_double;
3785
3786 } SV;
3787-@@ -1140,6 +1182,24 @@
3788+@@ -1138,6 +1180,24 @@
3789 uint in_sub_stmt;
3790 bool enable_slow_log;
3791 bool last_insert_id_used;
3792@@ -764,7 +764,7 @@
3793 SAVEPOINT *savepoints;
3794 enum enum_check_fields count_cuted_fields;
3795 };
3796-@@ -1588,6 +1648,71 @@
3797+@@ -1586,6 +1646,71 @@
3798 thr_lock_type update_lock_default;
3799 Delayed_insert *di;
3800
3801@@ -864,7 +864,7 @@
3802
3803 const char *any_db="*any*"; // Special symbol for check_access
3804
3805-@@ -888,6 +889,7 @@
3806+@@ -890,6 +891,7 @@
3807 the slow log only if opt_log_slow_admin_statements is set.
3808 */
3809 thd->enable_slow_log= TRUE;
3810@@ -872,7 +872,7 @@
3811 thd->lex->sql_command= SQLCOM_END; /* to avoid confusing VIEW detectors */
3812 thd->set_time();
3813 if (!thd->is_valid_time())
3814-@@ -1430,6 +1432,60 @@
3815+@@ -1440,6 +1442,60 @@
3816 DBUG_RETURN(error);
3817 }
3818
3819@@ -933,7 +933,7 @@
3820
3821 void log_slow_statement(THD *thd)
3822 {
3823-@@ -1443,13 +1499,48 @@
3824+@@ -1453,13 +1509,48 @@
3825 if (unlikely(thd->in_sub_stmt))
3826 DBUG_VOID_RETURN; // Don't set time for sub stmt
3827
3828@@ -983,7 +983,7 @@
3829 thd_proc_info(thd, "logging slow query");
3830
3831 if (((thd->server_status & SERVER_QUERY_WAS_SLOW) ||
3832-@@ -5301,7 +5392,8 @@
3833+@@ -5368,7 +5459,8 @@
3834 thd->stmt_da->reset_diagnostics_area();
3835 thd->warning_info->reset_for_next_command();
3836 thd->rand_used= 0;
3837@@ -995,7 +995,7 @@
3838 thd->binlog_unsafe_warning_flags= 0;
3839 --- a/sql/sql_select.cc
3840 +++ b/sql/sql_select.cc
3841-@@ -6902,7 +6902,10 @@
3842+@@ -6912,7 +6912,10 @@
3843 {
3844 join->thd->server_status|=SERVER_QUERY_NO_INDEX_USED;
3845 if (statistics)
3846@@ -1006,7 +1006,7 @@
3847 }
3848 }
3849 else
3850-@@ -6916,7 +6919,10 @@
3851+@@ -6926,7 +6929,10 @@
3852 {
3853 join->thd->server_status|=SERVER_QUERY_NO_INDEX_USED;
3854 if (statistics)
3855@@ -1017,7 +1017,7 @@
3856 }
3857 }
3858 if (!table->no_keyread)
3859-@@ -10264,6 +10270,7 @@
3860+@@ -10274,6 +10280,7 @@
3861 (ulong) rows_limit,test(group)));
3862
3863 status_var_increment(thd->status_var.created_tmp_tables);
3864@@ -1025,7 +1025,7 @@
3865
3866 if (use_temp_pool && !(test_flags & TEST_KEEP_TMP_TABLES))
3867 temp_pool_slot = bitmap_lock_set_next(&temp_pool);
3868-@@ -11162,6 +11169,7 @@
3869+@@ -11175,6 +11182,7 @@
3870 goto err;
3871 }
3872 status_var_increment(table->in_use->status_var.created_tmp_disk_tables);
3873@@ -1033,7 +1033,7 @@
3874 share->db_record_offset= 1;
3875 DBUG_RETURN(0);
3876 err:
3877-@@ -11180,6 +11188,14 @@
3878+@@ -11193,6 +11201,14 @@
3879 save_proc_info=thd->proc_info;
3880 thd_proc_info(thd, "removing tmp table");
3881
3882@@ -1102,7 +1102,7 @@
3883 static bool fix_low_prio_updates(sys_var *self, THD *thd, enum_var_type type)
3884 {
3885 if (type == OPT_SESSION)
3886-@@ -2898,6 +2921,123 @@
3887+@@ -2904,6 +2927,123 @@
3888 DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
3889 ON_UPDATE(fix_log_state));
3890
3891@@ -2483,7 +2483,7 @@
3892 CHECK_SPACE(pos, end, 1);
3893 --- a/sql/log_event.h
3894 +++ b/sql/log_event.h
3895-@@ -342,6 +342,10 @@
3896+@@ -343,6 +343,10 @@
3897
3898 #define Q_INVOKER 11
3899
3900@@ -2729,7 +2729,7 @@
3901 --log-tc=name Path to transaction coordinator log (used for
3902 transactions that affect more than one storage engine,
3903 when binary log is disabled).
3904-@@ -660,6 +676,18 @@
3905+@@ -662,6 +678,18 @@
3906 Log slow queries to given log file. Defaults logging to
3907 hostname-slow.log. Must be enabled to activate other slow
3908 log options
3909@@ -2748,7 +2748,7 @@
3910 --socket=name Socket file to use for connection
3911 --sort-buffer-size=#
3912 Each thread that needs to do a sort allocates a buffer of
3913-@@ -817,7 +845,11 @@
3914+@@ -819,7 +847,11 @@
3915 log-short-format FALSE
3916 log-slave-updates FALSE
3917 log-slow-admin-statements FALSE
3918@@ -2760,7 +2760,7 @@
3919 log-tc tc.log
3920 log-tc-size 24576
3921 log-warnings 1
3922-@@ -933,6 +965,9 @@
3923+@@ -936,6 +968,9 @@
3924 slave-type-conversions
3925 slow-launch-time 2
3926 slow-query-log FALSE
3927
3928=== modified file 'patches/userstat.patch'
3929--- patches/userstat.patch 2011-12-13 13:49:04 +0000
3930+++ patches/userstat.patch 2011-12-29 02:23:24 +0000
3931@@ -363,7 +363,7 @@
3932 /*
3933 Log error with all enabled log event handlers
3934
3935-@@ -5029,6 +5036,8 @@
3936+@@ -5026,6 +5033,8 @@
3937 thd->first_successful_insert_id_in_prev_stmt_for_binlog);
3938 if (e.write(file))
3939 goto err;
3940@@ -372,7 +372,7 @@
3941 }
3942 if (thd->auto_inc_intervals_in_cur_stmt_for_binlog.nb_elements() > 0)
3943 {
3944-@@ -5040,12 +5049,16 @@
3945+@@ -5037,12 +5046,16 @@
3946 minimum());
3947 if (e.write(file))
3948 goto err;
3949@@ -389,7 +389,7 @@
3950 }
3951 if (thd->user_var_events.elements)
3952 {
3953-@@ -5068,6 +5081,8 @@
3954+@@ -5065,6 +5078,8 @@
3955 flags);
3956 if (e.write(file))
3957 goto err;
3958@@ -398,7 +398,7 @@
3959 }
3960 }
3961 }
3962-@@ -5079,6 +5094,8 @@
3963+@@ -5076,6 +5091,8 @@
3964 if (event_info->write(file) ||
3965 DBUG_EVALUATE_IF("injecting_fault_writing", 1, 0))
3966 goto err;
3967@@ -407,7 +407,7 @@
3968
3969 error= 0;
3970 err:
3971-@@ -5264,7 +5281,8 @@
3972+@@ -5310,7 +5327,8 @@
3973 be reset as a READ_CACHE to be able to read the contents from it.
3974 */
3975
3976@@ -417,7 +417,7 @@
3977 {
3978 Mutex_sentry sentry(lock_log ? &LOCK_log : NULL);
3979
3980-@@ -5311,6 +5329,7 @@
3981+@@ -5357,6 +5375,7 @@
3982 /* write the first half of the split header */
3983 if (my_b_write(&log_file, header, carry))
3984 return ER_ERROR_ON_WRITE;
3985@@ -425,7 +425,7 @@
3986
3987 /*
3988 copy fixed second half of header to cache so the correct
3989-@@ -5379,6 +5398,7 @@
3990+@@ -5425,6 +5444,7 @@
3991 /* Write data to the binary log file */
3992 if (my_b_write(&log_file, cache->read_pos, length))
3993 return ER_ERROR_ON_WRITE;
3994@@ -433,7 +433,7 @@
3995 cache->read_pos=cache->read_end; // Mark buffer used up
3996 } while ((length= my_b_fill(cache)));
3997
3998-@@ -5493,20 +5513,23 @@
3999+@@ -5548,20 +5568,23 @@
4000 Query_log_event qinfo(thd, STRING_WITH_LEN("BEGIN"), TRUE, FALSE, TRUE, 0);
4001 if (qinfo.write(&log_file))
4002 goto err;
4003@@ -471,7 +471,7 @@
4004 void set_write_error(THD *thd, bool is_transactional);
4005 bool check_write_error(THD *thd);
4006
4007-@@ -589,6 +590,7 @@
4008+@@ -591,6 +592,7 @@
4009 const char *sql_text, uint sql_text_len,
4010 CHARSET_INFO *client_cs);
4011 void flush();
4012@@ -726,7 +726,7 @@
4013 if (delete_table)
4014 --- a/sql/sql_class.cc
4015 +++ b/sql/sql_class.cc
4016-@@ -885,6 +885,13 @@
4017+@@ -978,6 +978,13 @@
4018 mysys_var=0;
4019 binlog_evt_union.do_union= FALSE;
4020 enable_slow_log= 0;
4021@@ -740,7 +740,7 @@
4022 #ifndef DBUG_OFF
4023 dbug_sentry=THD_SENTRY_MAGIC;
4024 #endif
4025-@@ -1264,6 +1271,7 @@
4026+@@ -1357,6 +1364,7 @@
4027 variables.option_bits|= OPTION_BIN_LOG;
4028 else
4029 variables.option_bits&= ~OPTION_BIN_LOG;
4030@@ -748,7 +748,7 @@
4031
4032 #if defined(ENABLED_DEBUG_SYNC)
4033 /* Initialize the Debug Sync Facility. See debug_sync.cc. */
4034-@@ -1273,6 +1281,94 @@
4035+@@ -1366,6 +1374,94 @@
4036 clear_slow_extended();
4037 }
4038
4039@@ -843,7 +843,7 @@
4040
4041 /*
4042 Init THD for query processing.
4043-@@ -2027,6 +2123,32 @@
4044+@@ -2120,6 +2216,32 @@
4045 }
4046 #endif
4047
4048@@ -876,7 +876,7 @@
4049
4050 struct Item_change_record: public ilink
4051 {
4052-@@ -2203,6 +2325,7 @@
4053+@@ -2296,6 +2418,7 @@
4054 }
4055
4056 thd->sent_row_count++;
4057@@ -884,7 +884,7 @@
4058
4059 if (thd->vio_ok())
4060 DBUG_RETURN(protocol->write());
4061-@@ -2295,6 +2418,7 @@
4062+@@ -2388,6 +2511,7 @@
4063 select_export::~select_export()
4064 {
4065 thd->sent_row_count=row_count;
4066@@ -892,7 +892,7 @@
4067 }
4068
4069
4070-@@ -3318,6 +3442,7 @@
4071+@@ -3411,6 +3535,7 @@
4072 if (likely(thd != 0))
4073 { /* current_thd==0 when close_connection() calls net_send_error() */
4074 thd->status_var.bytes_sent+= length;
4075@@ -900,7 +900,7 @@
4076 }
4077 }
4078
4079-@@ -3325,6 +3450,7 @@
4080+@@ -3418,6 +3543,7 @@
4081 void thd_increment_bytes_received(ulong length)
4082 {
4083 current_thd->status_var.bytes_received+= length;
4084@@ -910,7 +910,7 @@
4085
4086 --- a/sql/sql_class.h
4087 +++ b/sql/sql_class.h
4088-@@ -1644,6 +1644,8 @@
4089+@@ -1705,6 +1705,8 @@
4090 */
4091 enum enum_server_command command;
4092 uint32 server_id;
4093@@ -919,7 +919,7 @@
4094 uint32 file_id; // for LOAD DATA INFILE
4095 /* remote (peer) port */
4096 uint16 peer_port;
4097-@@ -2153,6 +2155,8 @@
4098+@@ -2214,6 +2216,8 @@
4099 */
4100 enum_tx_isolation tx_isolation;
4101 enum_check_fields count_cuted_fields;
4102@@ -928,7 +928,7 @@
4103
4104 DYNAMIC_ARRAY user_var_events; /* For user variables replication */
4105 MEM_ROOT *user_var_events_alloc; /* Allocate above array elements here */
4106-@@ -2247,6 +2251,49 @@
4107+@@ -2308,6 +2312,49 @@
4108 */
4109 LOG_INFO* current_linfo;
4110 NET* slave_net; // network connection from slave -> m.
4111@@ -978,7 +978,7 @@
4112 /* Used by the sys_var class to store temporary values */
4113 union
4114 {
4115-@@ -2327,6 +2374,11 @@
4116+@@ -2388,6 +2435,11 @@
4117 alloc_root.
4118 */
4119 void init_for_queries();
4120@@ -990,7 +990,7 @@
4121 void change_user(void);
4122 void cleanup(void);
4123 void cleanup_after_query();
4124-@@ -2799,6 +2851,15 @@
4125+@@ -2860,6 +2912,15 @@
4126 }
4127 thd_scheduler scheduler;
4128
4129@@ -1006,7 +1006,7 @@
4130 public:
4131 inline Internal_error_handler *get_internal_handler()
4132 { return m_internal_handler; }
4133-@@ -2999,6 +3060,10 @@
4134+@@ -3060,6 +3121,10 @@
4135 LEX_STRING invoker_host;
4136 };
4137
4138@@ -1710,7 +1710,7 @@
4139
4140 --- a/sql/sql_insert.cc
4141 +++ b/sql/sql_insert.cc
4142-@@ -1070,13 +1070,14 @@
4143+@@ -1072,13 +1072,14 @@
4144
4145 if (error)
4146 goto abort;
4147@@ -1728,7 +1728,7 @@
4148 }
4149 else
4150 {
4151-@@ -1092,8 +1093,10 @@
4152+@@ -1094,8 +1095,10 @@
4153 sprintf(buff, ER(ER_INSERT_INFO), (ulong) info.records,
4154 (ulong) (info.deleted + updated),
4155 (ulong) thd->warning_info->statement_warn_count());
4156@@ -1740,7 +1740,7 @@
4157 thd->abort_on_warning= 0;
4158 DBUG_RETURN(FALSE);
4159
4160-@@ -3535,6 +3538,7 @@
4161+@@ -3540,6 +3543,7 @@
4162 thd->first_successful_insert_id_in_prev_stmt :
4163 (info.copied ? autoinc_value_of_last_inserted_row : 0));
4164 ::my_ok(thd, row_count, id, buff);
4165@@ -3219,7 +3219,7 @@
4166 #define REG_NEW_RECORD 2 /* Write a new record if not found */
4167 --- a/sql/sys_vars.cc
4168 +++ b/sql/sys_vars.cc
4169-@@ -1632,6 +1632,17 @@
4170+@@ -1638,6 +1638,17 @@
4171 NO_MUTEX_GUARD, NOT_IN_BINLOG,
4172 ON_CHECK(check_read_only), ON_UPDATE(fix_read_only));
4173
4174@@ -3461,7 +3461,7 @@
4175 \ No newline at end of file
4176 --- a/mysql-test/r/mysqld--help-notwin.result
4177 +++ b/mysql-test/r/mysqld--help-notwin.result
4178-@@ -743,6 +743,8 @@
4179+@@ -745,6 +745,8 @@
4180 Define threads usage for handling queries, one of
4181 one-thread-per-connection, no-threads, loaded-dynamically
4182 --thread-stack=# The stack size for each thread
4183@@ -3470,7 +3470,7 @@
4184 --time-format=name The TIME format (ignored)
4185 --timed-mutexes Specify whether to time mutexes (only InnoDB mutexes are
4186 currently supported)
4187-@@ -768,6 +770,9 @@
4188+@@ -770,6 +772,9 @@
4189 of the underlying table and the query uses a LIMIT clause
4190 (usually get from GUI tools)
4191 -u, --user=name Run mysqld daemon as user.
4192@@ -3480,7 +3480,7 @@
4193 -v, --verbose Used with --help option for detailed help.
4194 -V, --version Output version information and exit.
4195 --wait-timeout=# The number of seconds the server waits for activity on a
4196-@@ -1002,6 +1007,7 @@
4197+@@ -1005,6 +1010,7 @@
4198 thread-cache-size 0
4199 thread-handling one-thread-per-connection
4200 thread-stack 262144
4201@@ -3488,7 +3488,7 @@
4202 time-format %H:%i:%s
4203 timed-mutexes FALSE
4204 tmp-table-size 16777216
4205-@@ -1009,6 +1015,7 @@
4206+@@ -1012,6 +1018,7 @@
4207 transaction-isolation REPEATABLE-READ
4208 transaction-prealloc-size 4096
4209 updatable-views-with-limit YES

Subscribers

People subscribed via source and target branches