Merge lp:~percona-dev/percona-server/5.5-kill_idle_transaction-innodb_fake_changes into lp:percona-server/5.5
- 5.5-kill_idle_transaction-innodb_fake_changes
- Merge into 5.5
Proposed by
Valentine Gostev
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Stewart Smith | ||||||||
Approved revision: | no longer in the source branch. | ||||||||
Merged at revision: | 185 | ||||||||
Proposed branch: | lp:~percona-dev/percona-server/5.5-kill_idle_transaction-innodb_fake_changes | ||||||||
Merge into: | lp:percona-server/5.5 | ||||||||
Diff against target: |
1610 lines (+489/-184) 14 files modified
patches/innodb_adaptive_hash_index_partitions.patch (+5/-5) patches/innodb_buffer_pool_pages_i_s.patch (+1/-1) patches/innodb_buffer_pool_shm.patch (+3/-3) patches/innodb_deadlock_count.patch (+4/-4) patches/innodb_fake_changes.patch (+214/-67) patches/innodb_fast_checksum.patch (+6/-6) patches/innodb_files_extend.patch (+6/-6) patches/innodb_fix_misc.patch (+5/-5) patches/innodb_kill_idle_transaction.patch (+189/-37) patches/innodb_pass_corrupt_table.patch (+25/-25) patches/innodb_separate_doublewrite.patch (+11/-11) patches/innodb_show_status_extend.patch (+13/-13) patches/mysql-test.diff (+5/-1) patches/series (+2/-0) |
||||||||
To merge this branch: | bzr merge lp:~percona-dev/percona-server/5.5-kill_idle_transaction-innodb_fake_changes | ||||||||
Related bugs: |
|
||||||||
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stewart Smith (community) | Approve | ||
Review via email: mp+78732@code.launchpad.net |
Commit message
Description of the change
Ported tests for innodb_
Resolved text conflict from previous MP
To post a comment you must log in.
Revision history for this message
Stewart Smith (stewart) : | # |
review:
Approve
Revision history for this message
Stewart Smith (stewart) wrote : | # |
Revision history for this message
Oleg Tsarev (tsarev) wrote : | # |
Stewart, tests was run, but was OK (because tests with --source include/
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'patches/innodb_adaptive_hash_index_partitions.patch' |
2 | --- patches/innodb_adaptive_hash_index_partitions.patch 2011-08-09 20:52:20 +0000 |
3 | +++ patches/innodb_adaptive_hash_index_partitions.patch 2011-10-08 19:50:30 +0000 |
4 | @@ -1078,7 +1078,7 @@ |
5 | #ifndef UNIV_HOTBACKUP |
6 | --- a/storage/innobase/handler/ha_innodb.cc |
7 | +++ b/storage/innobase/handler/ha_innodb.cc |
8 | -@@ -11718,6 +11718,11 @@ |
9 | +@@ -11722,6 +11722,11 @@ |
10 | "Disable with --skip-innodb-adaptive-hash-index.", |
11 | NULL, innodb_adaptive_hash_index_update, TRUE); |
12 | |
13 | @@ -1090,7 +1090,7 @@ |
14 | static MYSQL_SYSVAR_ULONG(replication_delay, srv_replication_delay, |
15 | PLUGIN_VAR_RQCMDARG, |
16 | "Replication thread delay (ms) on the slave server if " |
17 | -@@ -12085,6 +12090,7 @@ |
18 | +@@ -12096,6 +12101,7 @@ |
19 | MYSQL_SYSVAR(use_sys_stats_table), |
20 | MYSQL_SYSVAR(stats_sample_pages), |
21 | MYSQL_SYSVAR(adaptive_hash_index), |
22 | @@ -1523,7 +1523,7 @@ |
23 | |
24 | --- a/storage/innobase/srv/srv0srv.c |
25 | +++ b/storage/innobase/srv/srv0srv.c |
26 | -@@ -2045,7 +2045,9 @@ |
27 | +@@ -2048,7 +2048,9 @@ |
28 | "-------------------------------------\n", file); |
29 | ibuf_print(file); |
30 | |
31 | @@ -1534,7 +1534,7 @@ |
32 | |
33 | fprintf(file, |
34 | "%.2f hash searches/s, %.2f non-hash searches/s\n", |
35 | -@@ -2070,14 +2072,15 @@ |
36 | +@@ -2073,14 +2075,15 @@ |
37 | ut_total_allocated_memory, |
38 | mem_pool_get_reserved(mem_comm_pool)); |
39 | /* Calcurate reserved memories */ |
40 | @@ -1554,7 +1554,7 @@ |
41 | |
42 | lock_sys_subtotal = 0; |
43 | if (trx_sys) { |
44 | -@@ -2103,10 +2106,10 @@ |
45 | +@@ -2106,10 +2109,10 @@ |
46 | " Recovery system %lu \t(%lu + %lu)\n", |
47 | |
48 | (ulong) (btr_search_sys |
49 | |
50 | === modified file 'patches/innodb_buffer_pool_pages_i_s.patch' |
51 | --- patches/innodb_buffer_pool_pages_i_s.patch 2011-08-09 20:52:20 +0000 |
52 | +++ patches/innodb_buffer_pool_pages_i_s.patch 2011-10-08 19:50:30 +0000 |
53 | @@ -46,7 +46,7 @@ |
54 | @return TRUE */ |
55 | --- a/storage/innobase/handler/ha_innodb.cc |
56 | +++ b/storage/innobase/handler/ha_innodb.cc |
57 | -@@ -12165,6 +12165,9 @@ |
58 | +@@ -12177,6 +12177,9 @@ |
59 | i_s_innodb_sys_stats, |
60 | i_s_innodb_table_stats, |
61 | i_s_innodb_index_stats, |
62 | |
63 | === modified file 'patches/innodb_buffer_pool_shm.patch' |
64 | --- patches/innodb_buffer_pool_shm.patch 2011-09-03 15:15:31 +0000 |
65 | +++ patches/innodb_buffer_pool_shm.patch 2011-10-08 19:50:30 +0000 |
66 | @@ -42,7 +42,7 @@ |
67 | |
68 | |
69 | static char* internal_innobase_data_file_path = NULL; |
70 | -@@ -2675,6 +2677,12 @@ |
71 | +@@ -2677,6 +2679,12 @@ |
72 | srv_buf_pool_size = (ulint) innobase_buffer_pool_size; |
73 | srv_buf_pool_instances = (ulint) innobase_buffer_pool_instances; |
74 | |
75 | @@ -55,7 +55,7 @@ |
76 | srv_mem_pool_size = (ulint) innobase_additional_mem_pool_size; |
77 | |
78 | srv_n_file_io_threads = (ulint) innobase_file_io_threads; |
79 | -@@ -11749,6 +11757,16 @@ |
80 | +@@ -11753,6 +11761,16 @@ |
81 | "Number of buffer pool instances, set to higher value on high-end machines to increase scalability", |
82 | NULL, NULL, 1L, 1L, MAX_BUFFER_POOLS, 1L); |
83 | |
84 | @@ -72,7 +72,7 @@ |
85 | static MYSQL_SYSVAR_ULONG(commit_concurrency, innobase_commit_concurrency, |
86 | PLUGIN_VAR_RQCMDARG, |
87 | "Helps in performance tuning in heavily concurrent environments.", |
88 | -@@ -12043,6 +12061,8 @@ |
89 | +@@ -12054,6 +12072,8 @@ |
90 | MYSQL_SYSVAR(autoextend_increment), |
91 | MYSQL_SYSVAR(buffer_pool_size), |
92 | MYSQL_SYSVAR(buffer_pool_instances), |
93 | |
94 | === modified file 'patches/innodb_deadlock_count.patch' |
95 | --- patches/innodb_deadlock_count.patch 2011-09-03 15:15:31 +0000 |
96 | +++ patches/innodb_deadlock_count.patch 2011-10-08 19:50:30 +0000 |
97 | @@ -7,7 +7,7 @@ |
98 | # should be done or reviewed by the maintainer! |
99 | --- a/storage/innobase/handler/ha_innodb.cc |
100 | +++ b/storage/innobase/handler/ha_innodb.cc |
101 | -@@ -687,6 +687,8 @@ |
102 | +@@ -689,6 +689,8 @@ |
103 | (char*) &export_vars.innodb_dblwr_pages_written, SHOW_LONG}, |
104 | {"dblwr_writes", |
105 | (char*) &export_vars.innodb_dblwr_writes, SHOW_LONG}, |
106 | @@ -28,7 +28,7 @@ |
107 | Gets the size of a lock struct. |
108 | --- a/storage/innobase/include/srv0srv.h |
109 | +++ b/storage/innobase/include/srv0srv.h |
110 | -@@ -758,6 +758,7 @@ |
111 | +@@ -761,6 +761,7 @@ |
112 | ulint innodb_buffer_pool_read_ahead_evicted;/*!< srv_read_ahead evicted*/ |
113 | ulint innodb_dblwr_pages_written; /*!< srv_dblwr_pages_written */ |
114 | ulint innodb_dblwr_writes; /*!< srv_dblwr_writes */ |
115 | @@ -48,7 +48,7 @@ |
116 | break; |
117 | --- a/storage/innobase/srv/srv0srv.c |
118 | +++ b/storage/innobase/srv/srv0srv.c |
119 | -@@ -468,6 +468,7 @@ |
120 | +@@ -471,6 +471,7 @@ |
121 | static ulint srv_n_rows_deleted_old = 0; |
122 | static ulint srv_n_rows_read_old = 0; |
123 | |
124 | @@ -56,7 +56,7 @@ |
125 | UNIV_INTERN ulint srv_n_lock_wait_count = 0; |
126 | UNIV_INTERN ulint srv_n_lock_wait_current_count = 0; |
127 | UNIV_INTERN ib_int64_t srv_n_lock_wait_time = 0; |
128 | -@@ -2282,6 +2283,7 @@ |
129 | +@@ -2285,6 +2286,7 @@ |
130 | export_vars.innodb_buffer_pool_pages_data = LRU_len; |
131 | export_vars.innodb_buffer_pool_pages_dirty = flush_list_len; |
132 | export_vars.innodb_buffer_pool_pages_free = free_len; |
133 | |
134 | === modified file 'patches/innodb_fake_changes.patch' |
135 | --- patches/innodb_fake_changes.patch 2011-08-03 23:10:46 +0000 |
136 | +++ patches/innodb_fake_changes.patch 2011-10-08 19:50:30 +0000 |
137 | @@ -1,13 +1,12 @@ |
138 | # name : innodb_fake_changes.patch |
139 | -# introduced : 5.5.14 |
140 | +# introduced : 5.5.15 |
141 | # maintainer : Yasufumi |
142 | # |
143 | #!!! notice !!! |
144 | # Any small change to this file in the main branch |
145 | # should be done or reviewed by the maintainer! |
146 | -diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c |
147 | ---- a/storage/innobase/btr/btr0cur.c 2011-06-01 21:04:26.346416429 +0900 |
148 | -+++ b/storage/innobase/btr/btr0cur.c 2011-06-01 21:04:53.718415294 +0900 |
149 | +--- a/storage/innobase/btr/btr0cur.c |
150 | ++++ b/storage/innobase/btr/btr0cur.c |
151 | @@ -1167,6 +1167,11 @@ |
152 | rec_t* rec; |
153 | roll_ptr_t roll_ptr; |
154 | @@ -99,7 +98,7 @@ |
155 | if (block->is_hashed) { |
156 | /* The function row_upd_changes_ord_field_binary works only |
157 | if the update vector was built for a clustered index, we must |
158 | -@@ -2061,7 +2095,7 @@ |
159 | +@@ -2060,7 +2094,7 @@ |
160 | rec = btr_cur_get_rec(cursor); |
161 | index = cursor->index; |
162 | ut_ad(!!page_rec_is_comp(rec) == dict_table_is_comp(index->table)); |
163 | @@ -108,7 +107,7 @@ |
164 | /* The insert buffer tree should never be updated in place. */ |
165 | ut_ad(!dict_index_is_ibuf(index)); |
166 | |
167 | -@@ -2171,6 +2205,11 @@ |
168 | +@@ -2174,6 +2208,11 @@ |
169 | goto err_exit; |
170 | } |
171 | |
172 | @@ -120,7 +119,7 @@ |
173 | /* Ok, we may do the replacement. Store on the page infimum the |
174 | explicit locks on rec, before deleting rec (see the comment in |
175 | btr_cur_pessimistic_update). */ |
176 | -@@ -2321,9 +2360,9 @@ |
177 | +@@ -2324,9 +2363,9 @@ |
178 | rec = btr_cur_get_rec(cursor); |
179 | index = cursor->index; |
180 | |
181 | @@ -132,7 +131,7 @@ |
182 | #ifdef UNIV_ZIP_DEBUG |
183 | ut_a(!page_zip || page_zip_validate(page_zip, page)); |
184 | #endif /* UNIV_ZIP_DEBUG */ |
185 | -@@ -2411,6 +2450,9 @@ |
186 | +@@ -2414,6 +2453,9 @@ |
187 | |
188 | ut_ad(big_rec_vec == NULL); |
189 | |
190 | @@ -142,8 +141,8 @@ |
191 | btr_rec_free_updated_extern_fields( |
192 | index, rec, page_zip, offsets, update, |
193 | trx_is_recv(trx) ? RB_RECOVERY : RB_NORMAL, mtr); |
194 | -@@ -2445,6 +2487,12 @@ |
195 | - } |
196 | +@@ -2452,6 +2494,12 @@ |
197 | + ut_ad(flags & BTR_KEEP_POS_FLAG); |
198 | } |
199 | |
200 | + if (trx->fake_changes) { |
201 | @@ -155,7 +154,7 @@ |
202 | /* Store state of explicit locks on rec on the page infimum record, |
203 | before deleting rec. The page infimum acts as a dummy carrier of the |
204 | locks, taking care also of lock releases, before we can move the locks |
205 | -@@ -2746,6 +2794,11 @@ |
206 | +@@ -2807,6 +2855,11 @@ |
207 | ut_ad(dict_index_is_clust(index)); |
208 | ut_ad(!rec_get_deleted_flag(rec, rec_offs_comp(offsets))); |
209 | |
210 | @@ -167,7 +166,7 @@ |
211 | err = lock_clust_rec_modify_check_and_lock(flags, block, |
212 | rec, index, offsets, thr); |
213 | |
214 | -@@ -2883,6 +2936,11 @@ |
215 | +@@ -2944,6 +2997,11 @@ |
216 | rec_t* rec; |
217 | ulint err; |
218 | |
219 | @@ -179,10 +178,9 @@ |
220 | block = btr_cur_get_block(cursor); |
221 | rec = btr_cur_get_rec(cursor); |
222 | |
223 | -diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc |
224 | ---- a/storage/innobase/handler/ha_innodb.cc 2011-06-01 21:04:26.511385596 +0900 |
225 | -+++ b/storage/innobase/handler/ha_innodb.cc 2011-06-01 21:04:53.723390828 +0900 |
226 | -@@ -486,6 +486,12 @@ |
227 | +--- a/storage/innobase/handler/ha_innodb.cc |
228 | ++++ b/storage/innobase/handler/ha_innodb.cc |
229 | +@@ -488,6 +488,12 @@ |
230 | " or 2 (write at commit, flush once per second).", |
231 | NULL, NULL, 1, 0, 2, 0); |
232 | |
233 | @@ -195,7 +193,7 @@ |
234 | |
235 | static handler *innobase_create_handler(handlerton *hton, |
236 | TABLE_SHARE *table, |
237 | -@@ -1682,6 +1688,8 @@ |
238 | +@@ -1683,6 +1689,8 @@ |
239 | trx->check_unique_secondary = !thd_test_options( |
240 | thd, OPTION_RELAXED_UNIQUE_CHECKS); |
241 | |
242 | @@ -204,19 +202,19 @@ |
243 | #ifdef EXTENDED_SLOWLOG |
244 | if (thd_log_slow_verbosity(thd) & SLOG_V_INNODB) { |
245 | trx->take_stats = TRUE; |
246 | -@@ -3164,6 +3172,11 @@ |
247 | +@@ -3167,6 +3175,11 @@ |
248 | trx_search_latch_release_if_reserved(trx); |
249 | } |
250 | |
251 | -+ if (trx->fake_changes) { |
252 | ++ if (trx->fake_changes && (all || (!thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))) { |
253 | + innobase_rollback(hton, thd, all); /* rollback implicitly */ |
254 | ++ thd->stmt_da->reset_diagnostics_area(); /* because debug assertion code complains, if something left */ |
255 | + DBUG_RETURN(HA_ERR_WRONG_COMMAND); |
256 | + } |
257 | -+ |
258 | /* Transaction is deregistered only in a commit or a rollback. If |
259 | it is deregistered we know there cannot be resources to be freed |
260 | and we could return immediately. For the time being, we play safe |
261 | -@@ -7507,6 +7520,12 @@ |
262 | +@@ -7510,6 +7523,12 @@ |
263 | |
264 | trx = innobase_trx_allocate(thd); |
265 | |
266 | @@ -229,7 +227,7 @@ |
267 | /* Latch the InnoDB data dictionary exclusively so that no deadlocks |
268 | or lock waits can happen in it during a table create operation. |
269 | Drop table etc. do this latching in row0mysql.c. */ |
270 | -@@ -7727,6 +7746,10 @@ |
271 | +@@ -7730,6 +7749,10 @@ |
272 | DBUG_RETURN(HA_ERR_CRASHED); |
273 | } |
274 | |
275 | @@ -240,7 +238,7 @@ |
276 | /* Truncate the table in InnoDB */ |
277 | |
278 | error = row_truncate_table_for_mysql(prebuilt->table, prebuilt->trx); |
279 | -@@ -7783,6 +7806,12 @@ |
280 | +@@ -7786,6 +7809,12 @@ |
281 | |
282 | trx = innobase_trx_allocate(thd); |
283 | |
284 | @@ -253,7 +251,7 @@ |
285 | name_len = strlen(name); |
286 | |
287 | ut_a(name_len < 1000); |
288 | -@@ -7869,6 +7898,12 @@ |
289 | +@@ -7872,6 +7901,12 @@ |
290 | trx->mysql_thd = NULL; |
291 | #else |
292 | trx = innobase_trx_allocate(thd); |
293 | @@ -266,7 +264,7 @@ |
294 | #endif |
295 | row_drop_database_for_mysql(namebuf, trx); |
296 | my_free(namebuf); |
297 | -@@ -7974,6 +8009,11 @@ |
298 | +@@ -7977,6 +8012,11 @@ |
299 | trx_search_latch_release_if_reserved(parent_trx); |
300 | |
301 | trx = innobase_trx_allocate(thd); |
302 | @@ -278,7 +276,7 @@ |
303 | |
304 | error = innobase_rename_table(trx, from, to, TRUE); |
305 | |
306 | -@@ -10772,6 +10812,10 @@ |
307 | +@@ -10775,6 +10815,10 @@ |
308 | return(0); |
309 | } |
310 | |
311 | @@ -289,7 +287,7 @@ |
312 | thd_get_xid(thd, (MYSQL_XID*) &trx->xid); |
313 | |
314 | /* Release a possible FIFO ticket and search latch. Since we will |
315 | -@@ -12300,6 +12344,7 @@ |
316 | +@@ -12311,6 +12355,7 @@ |
317 | MYSQL_SYSVAR(rollback_segments), |
318 | MYSQL_SYSVAR(corrupt_table_action), |
319 | MYSQL_SYSVAR(lazy_drop_table), |
320 | @@ -297,9 +295,8 @@ |
321 | NULL |
322 | }; |
323 | |
324 | -diff -ruN a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc |
325 | ---- a/storage/innobase/handler/handler0alter.cc 2011-04-11 19:44:03.000000000 +0900 |
326 | -+++ b/storage/innobase/handler/handler0alter.cc 2011-06-01 21:04:53.728495636 +0900 |
327 | +--- a/storage/innobase/handler/handler0alter.cc |
328 | ++++ b/storage/innobase/handler/handler0alter.cc |
329 | @@ -695,6 +695,10 @@ |
330 | possible adaptive hash latch to avoid deadlocks of threads. */ |
331 | trx_search_latch_release_if_reserved(prebuilt->trx); |
332 | @@ -349,9 +346,8 @@ |
333 | trx_start_if_not_started(trx); |
334 | |
335 | /* Flag this transaction as a dictionary operation, so that |
336 | -diff -ruN a/storage/innobase/ibuf/ibuf0ibuf.c b/storage/innobase/ibuf/ibuf0ibuf.c |
337 | ---- a/storage/innobase/ibuf/ibuf0ibuf.c 2011-06-01 21:04:26.529383815 +0900 |
338 | -+++ b/storage/innobase/ibuf/ibuf0ibuf.c 2011-06-01 21:04:53.732416483 +0900 |
339 | +--- a/storage/innobase/ibuf/ibuf0ibuf.c |
340 | ++++ b/storage/innobase/ibuf/ibuf0ibuf.c |
341 | @@ -3496,6 +3496,8 @@ |
342 | |
343 | ut_a(trx_sys_multiple_tablespace_format); |
344 | @@ -361,9 +357,8 @@ |
345 | do_merge = FALSE; |
346 | |
347 | /* Perform dirty reads of ibuf->size and ibuf->max_size, to |
348 | -diff -ruN a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h |
349 | ---- a/storage/innobase/include/trx0trx.h 2011-06-01 21:04:25.762416618 +0900 |
350 | -+++ b/storage/innobase/include/trx0trx.h 2011-06-01 21:04:53.736387944 +0900 |
351 | +--- a/storage/innobase/include/trx0trx.h |
352 | ++++ b/storage/innobase/include/trx0trx.h |
353 | @@ -512,6 +512,7 @@ |
354 | FALSE, one can save CPU time and about |
355 | 150 bytes in the undo log size as then |
356 | @@ -372,9 +367,8 @@ |
357 | ulint flush_log_later;/* In 2PC, we hold the |
358 | prepare_commit mutex across |
359 | both phases. In that case, we |
360 | -diff -ruN a/storage/innobase/lock/lock0lock.c b/storage/innobase/lock/lock0lock.c |
361 | ---- a/storage/innobase/lock/lock0lock.c 2011-06-01 21:04:26.543396960 +0900 |
362 | -+++ b/storage/innobase/lock/lock0lock.c 2011-06-01 21:04:53.739416526 +0900 |
363 | +--- a/storage/innobase/lock/lock0lock.c |
364 | ++++ b/storage/innobase/lock/lock0lock.c |
365 | @@ -3912,6 +3912,10 @@ |
366 | |
367 | trx = thr_get_trx(thr); |
368 | @@ -442,9 +436,8 @@ |
369 | heap_no = page_rec_get_heap_no(rec); |
370 | |
371 | lock_mutex_enter_kernel(); |
372 | -diff -ruN a/storage/innobase/que/que0que.c b/storage/innobase/que/que0que.c |
373 | ---- a/storage/innobase/que/que0que.c 2011-06-01 21:04:25.553416889 +0900 |
374 | -+++ b/storage/innobase/que/que0que.c 2011-06-01 21:04:53.743419001 +0900 |
375 | +--- a/storage/innobase/que/que0que.c |
376 | ++++ b/storage/innobase/que/que0que.c |
377 | @@ -1417,6 +1417,12 @@ |
378 | |
379 | ut_a(trx->error_state == DB_SUCCESS); |
380 | @@ -458,9 +451,8 @@ |
381 | if (reserve_dict_mutex) { |
382 | mutex_enter(&dict_sys->mutex); |
383 | } |
384 | -diff -ruN a/storage/innobase/row/row0ins.c b/storage/innobase/row/row0ins.c |
385 | ---- a/storage/innobase/row/row0ins.c 2011-06-01 21:04:26.099449453 +0900 |
386 | -+++ b/storage/innobase/row/row0ins.c 2011-06-01 21:04:53.746383371 +0900 |
387 | +--- a/storage/innobase/row/row0ins.c |
388 | ++++ b/storage/innobase/row/row0ins.c |
389 | @@ -1499,6 +1499,11 @@ |
390 | if (UNIV_LIKELY_NULL(heap)) { |
391 | mem_heap_free(heap); |
392 | @@ -473,7 +465,7 @@ |
393 | return(err); |
394 | } |
395 | |
396 | -@@ -2004,7 +2009,7 @@ |
397 | +@@ -2005,7 +2010,7 @@ |
398 | } |
399 | |
400 | btr_cur_search_to_nth_level(index, 0, entry, PAGE_CUR_LE, |
401 | @@ -482,7 +474,7 @@ |
402 | &cursor, 0, __FILE__, __LINE__, &mtr); |
403 | |
404 | if (cursor.flag == BTR_CUR_INSERT_TO_IBUF) { |
405 | -@@ -2065,7 +2070,7 @@ |
406 | +@@ -2066,7 +2071,7 @@ |
407 | |
408 | btr_cur_search_to_nth_level(index, 0, entry, |
409 | PAGE_CUR_LE, |
410 | @@ -491,11 +483,10 @@ |
411 | &cursor, 0, |
412 | __FILE__, __LINE__, &mtr); |
413 | } |
414 | -@@ -2119,6 +2124,22 @@ |
415 | +@@ -2154,6 +2159,21 @@ |
416 | + mtr_commit(&mtr); |
417 | + |
418 | if (UNIV_LIKELY_NULL(big_rec)) { |
419 | - rec_t* rec; |
420 | - ulint* offsets; |
421 | -+ |
422 | + if (thr_get_trx(thr)->fake_changes) { |
423 | + /* skip store extern */ |
424 | + if (modify) { |
425 | @@ -514,9 +505,8 @@ |
426 | mtr_start(&mtr); |
427 | |
428 | btr_cur_search_to_nth_level(index, 0, entry, PAGE_CUR_LE, |
429 | -diff -ruN a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c |
430 | ---- a/storage/innobase/row/row0mysql.c 2011-06-01 21:04:26.287385626 +0900 |
431 | -+++ b/storage/innobase/row/row0mysql.c 2011-06-01 21:04:53.749372325 +0900 |
432 | +--- a/storage/innobase/row/row0mysql.c |
433 | ++++ b/storage/innobase/row/row0mysql.c |
434 | @@ -1245,6 +1245,7 @@ |
435 | prebuilt->table->stat_n_rows--; |
436 | } |
437 | @@ -541,9 +531,8 @@ |
438 | row_update_statistics_if_needed(table); |
439 | |
440 | return(err); |
441 | -diff -ruN a/storage/innobase/row/row0upd.c b/storage/innobase/row/row0upd.c |
442 | ---- a/storage/innobase/row/row0upd.c 2011-06-01 21:04:25.588384975 +0900 |
443 | -+++ b/storage/innobase/row/row0upd.c 2011-06-01 21:04:53.753385366 +0900 |
444 | +--- a/storage/innobase/row/row0upd.c |
445 | ++++ b/storage/innobase/row/row0upd.c |
446 | @@ -1603,7 +1603,8 @@ |
447 | mode |= BTR_DELETE_MARK; |
448 | } |
449 | @@ -585,17 +574,17 @@ |
450 | |
451 | ut_ad(!rec_get_deleted_flag(btr_pcur_get_rec(pcur), |
452 | dict_table_is_comp(index->table))); |
453 | -@@ -2022,7 +2026,8 @@ |
454 | - node->cmpl_info, thr, mtr); |
455 | - mtr_commit(mtr); |
456 | - |
457 | -- if (err == DB_SUCCESS && big_rec) { |
458 | +@@ -2020,7 +2024,8 @@ |
459 | + err = btr_cur_pessimistic_update( |
460 | + BTR_NO_LOCKING_FLAG | BTR_KEEP_POS_FLAG, btr_cur, |
461 | + &heap, &big_rec, node->update, node->cmpl_info, thr, mtr); |
462 | +- if (big_rec) { |
463 | + /* skip store extern for fake_changes */ |
464 | -+ if (err == DB_SUCCESS && big_rec && !(thr_get_trx(thr)->fake_changes)) { |
465 | ++ if (big_rec && !(thr_get_trx(thr)->fake_changes)) { |
466 | ulint offsets_[REC_OFFS_NORMAL_SIZE]; |
467 | rec_t* rec; |
468 | rec_offs_init(offsets_); |
469 | -@@ -2146,7 +2151,8 @@ |
470 | +@@ -2161,7 +2166,8 @@ |
471 | |
472 | ut_a(pcur->rel_pos == BTR_PCUR_ON); |
473 | |
474 | @@ -605,9 +594,8 @@ |
475 | |
476 | if (!success) { |
477 | err = DB_RECORD_NOT_FOUND; |
478 | -diff -ruN a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c |
479 | ---- a/storage/innobase/trx/trx0trx.c 2011-06-01 21:04:26.411537237 +0900 |
480 | -+++ b/storage/innobase/trx/trx0trx.c 2011-06-01 21:04:53.756415956 +0900 |
481 | +--- a/storage/innobase/trx/trx0trx.c |
482 | ++++ b/storage/innobase/trx/trx0trx.c |
483 | @@ -121,6 +121,8 @@ |
484 | |
485 | trx->support_xa = TRUE; |
486 | @@ -617,3 +605,162 @@ |
487 | trx->check_foreigns = TRUE; |
488 | trx->check_unique_secondary = TRUE; |
489 | |
490 | +--- /dev/null |
491 | ++++ b/mysql-test/r/percona_innodb_fake_changes.result |
492 | +@@ -0,0 +1,55 @@ |
493 | ++DROP TABLE IF EXISTS t1; |
494 | ++# Checking variables |
495 | ++SHOW VARIABLES LIKE 'innodb_fake_changes'; |
496 | ++Variable_name Value |
497 | ++innodb_fake_changes OFF |
498 | ++SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes'; |
499 | ++VARIABLE_VALUE |
500 | ++OFF |
501 | ++SET innodb_fake_changes=1; |
502 | ++SHOW VARIABLES LIKE 'innodb_fake_changes'; |
503 | ++Variable_name Value |
504 | ++innodb_fake_changes ON |
505 | ++SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes'; |
506 | ++VARIABLE_VALUE |
507 | ++ON |
508 | ++SET innodb_fake_changes=default; |
509 | ++SHOW VARIABLES LIKE 'innodb_fake_changes'; |
510 | ++Variable_name Value |
511 | ++innodb_fake_changes OFF |
512 | ++SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes'; |
513 | ++VARIABLE_VALUE |
514 | ++OFF |
515 | ++# Explicit COMMIT should fail when innodb_fake_changes is enabled |
516 | ++# DML should be fine |
517 | ++CREATE TABLE t1 (a INT) ENGINE=InnoDB; |
518 | ++INSERT INTO t1 VALUES (1); |
519 | ++SET autocommit=0; |
520 | ++SET innodb_fake_changes=1; |
521 | ++BEGIN; |
522 | ++INSERT INTO t1 VALUES (2); |
523 | ++UPDATE t1 SET a=0; |
524 | ++DELETE FROM t1 LIMIT 1; |
525 | ++SELECT * FROM t1; |
526 | ++a |
527 | ++1 |
528 | ++COMMIT; |
529 | ++ERROR HY000: Got error 131 during COMMIT |
530 | ++SET innodb_fake_changes=default; |
531 | ++DROP TABLE t1; |
532 | ++# DDL must result in error |
533 | ++CREATE TABLE t1 (a INT) ENGINE=InnoDB; |
534 | ++SET autocommit=0; |
535 | ++SET innodb_fake_changes=1; |
536 | ++BEGIN; |
537 | ++CREATE TABLE t2 (a INT) ENGINE=InnoDB; |
538 | ++ERROR HY000: Can't create table 'test.t2' (errno: 131) |
539 | ++DROP TABLE t1; |
540 | ++ERROR 42S02: Unknown table 't1' |
541 | ++TRUNCATE TABLE t1; |
542 | ++ERROR HY000: Got error 131 during COMMIT |
543 | ++ALTER TABLE t1 ENGINE=MyISAM; |
544 | ++ERROR HY000: Got error 131 during COMMIT |
545 | ++ROLLBACK; |
546 | ++SET innodb_fake_changes=default; |
547 | ++DROP TABLE t1; |
548 | +--- /dev/null |
549 | ++++ b/mysql-test/r/percona_innodb_fake_changes_locks.result |
550 | +@@ -0,0 +1,19 @@ |
551 | ++DROP TABLE IF EXISTS t1; |
552 | ++# Verifying that X_LOCK not acquired |
553 | ++CREATE TABLE t1 (a INT) ENGINE=InnoDB; |
554 | ++INSERT INTO t1 VALUES (1); |
555 | ++SET autocommit=0; |
556 | ++SET innodb_fake_changes=1; |
557 | ++BEGIN; |
558 | ++SELECT * FROM t1 FOR UPDATE; |
559 | ++a |
560 | ++1 |
561 | ++SET innodb_lock_wait_timeout=3; |
562 | ++UPDATE t1 SET a=2; |
563 | ++ERROR HY000: Lock wait timeout exceeded; try restarting transaction |
564 | ++SELECT * FROM t1 LOCK IN SHARE MODE; |
565 | ++a |
566 | ++1 |
567 | ++ROLLBACK; |
568 | ++SET innodb_fake_changes=default; |
569 | ++DROP TABLE t1; |
570 | +--- /dev/null |
571 | ++++ b/mysql-test/t/percona_innodb_fake_changes.test |
572 | +@@ -0,0 +1,49 @@ |
573 | ++--source include/have_innodb.inc |
574 | ++ |
575 | ++--disable_warnings |
576 | ++DROP TABLE IF EXISTS t1; |
577 | ++--enable_warnings |
578 | ++ |
579 | ++ |
580 | ++--echo # Checking variables |
581 | ++SHOW VARIABLES LIKE 'innodb_fake_changes'; |
582 | ++SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes'; |
583 | ++SET innodb_fake_changes=1; |
584 | ++SHOW VARIABLES LIKE 'innodb_fake_changes'; |
585 | ++SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes'; |
586 | ++SET innodb_fake_changes=default; |
587 | ++SHOW VARIABLES LIKE 'innodb_fake_changes'; |
588 | ++SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes'; |
589 | ++ |
590 | ++--echo # Explicit COMMIT should fail when innodb_fake_changes is enabled |
591 | ++--echo # DML should be fine |
592 | ++CREATE TABLE t1 (a INT) ENGINE=InnoDB; |
593 | ++INSERT INTO t1 VALUES (1); |
594 | ++SET autocommit=0; |
595 | ++SET innodb_fake_changes=1; |
596 | ++BEGIN; |
597 | ++INSERT INTO t1 VALUES (2); |
598 | ++UPDATE t1 SET a=0; |
599 | ++DELETE FROM t1 LIMIT 1; |
600 | ++SELECT * FROM t1; |
601 | ++--error 1180 |
602 | ++COMMIT; |
603 | ++SET innodb_fake_changes=default; |
604 | ++DROP TABLE t1; |
605 | ++ |
606 | ++--echo # DDL must result in error |
607 | ++CREATE TABLE t1 (a INT) ENGINE=InnoDB; |
608 | ++SET autocommit=0; |
609 | ++SET innodb_fake_changes=1; |
610 | ++BEGIN; |
611 | ++--error 1005 |
612 | ++CREATE TABLE t2 (a INT) ENGINE=InnoDB; |
613 | ++--error 1051 |
614 | ++DROP TABLE t1; |
615 | ++--error 1180 |
616 | ++TRUNCATE TABLE t1; |
617 | ++--error 1180 |
618 | ++ALTER TABLE t1 ENGINE=MyISAM; |
619 | ++ROLLBACK; |
620 | ++SET innodb_fake_changes=default; |
621 | ++DROP TABLE t1; |
622 | +--- /dev/null |
623 | ++++ b/mysql-test/t/percona_innodb_fake_changes_locks.test |
624 | +@@ -0,0 +1,24 @@ |
625 | ++--source include/have_innodb.inc |
626 | ++ |
627 | ++--disable_warnings |
628 | ++DROP TABLE IF EXISTS t1; |
629 | ++--enable_warnings |
630 | ++ |
631 | ++--echo # Verifying that X_LOCK not acquired |
632 | ++CREATE TABLE t1 (a INT) ENGINE=InnoDB; |
633 | ++INSERT INTO t1 VALUES (1); |
634 | ++--connect (conn1,localhost,root,,) |
635 | ++--connection conn1 |
636 | ++SET autocommit=0; |
637 | ++SET innodb_fake_changes=1; |
638 | ++BEGIN; |
639 | ++SELECT * FROM t1 FOR UPDATE; |
640 | ++--connection default |
641 | ++SET innodb_lock_wait_timeout=3; |
642 | ++--error 1205 |
643 | ++UPDATE t1 SET a=2; |
644 | ++SELECT * FROM t1 LOCK IN SHARE MODE; |
645 | ++--connection conn1 |
646 | ++ROLLBACK; |
647 | ++SET innodb_fake_changes=default; |
648 | ++DROP TABLE t1; |
649 | |
650 | === modified file 'patches/innodb_fast_checksum.patch' |
651 | --- patches/innodb_fast_checksum.patch 2011-08-09 20:52:20 +0000 |
652 | +++ patches/innodb_fast_checksum.patch 2011-10-08 19:50:30 +0000 |
653 | @@ -153,15 +153,15 @@ |
654 | static my_bool innobase_recovery_stats = TRUE; |
655 | static my_bool innobase_locks_unsafe_for_binlog = FALSE; |
656 | static my_bool innobase_overwrite_relay_log_info = FALSE; |
657 | -@@ -2625,6 +2626,7 @@ |
658 | +@@ -2627,6 +2628,7 @@ |
659 | |
660 | srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite; |
661 | srv_use_checksums = (ibool) innobase_use_checksums; |
662 | + srv_fast_checksum = (ibool) innobase_fast_checksum; |
663 | |
664 | - #ifdef HAVE_LARGE_PAGES |
665 | - if ((os_use_large_pages = (ibool) my_use_large_pages)) |
666 | -@@ -11432,6 +11434,15 @@ |
667 | + srv_blocking_lru_restore = (ibool) innobase_blocking_lru_restore; |
668 | + |
669 | +@@ -11436,6 +11438,15 @@ |
670 | "Disable with --skip-innodb-checksums.", |
671 | NULL, NULL, TRUE); |
672 | |
673 | @@ -177,7 +177,7 @@ |
674 | static MYSQL_SYSVAR_STR(data_home_dir, innobase_data_home_dir, |
675 | PLUGIN_VAR_READONLY, |
676 | "The common part for InnoDB table spaces.", |
677 | -@@ -11946,6 +11957,7 @@ |
678 | +@@ -11957,6 +11968,7 @@ |
679 | MYSQL_SYSVAR(buffer_pool_size), |
680 | MYSQL_SYSVAR(buffer_pool_instances), |
681 | MYSQL_SYSVAR(checksums), |
682 | @@ -268,7 +268,7 @@ |
683 | +} |
684 | --- a/storage/innobase/srv/srv0srv.c |
685 | +++ b/storage/innobase/srv/srv0srv.c |
686 | -@@ -414,6 +414,7 @@ |
687 | +@@ -417,6 +417,7 @@ |
688 | |
689 | UNIV_INTERN ibool srv_use_doublewrite_buf = TRUE; |
690 | UNIV_INTERN ibool srv_use_checksums = TRUE; |
691 | |
692 | === modified file 'patches/innodb_files_extend.patch' |
693 | --- patches/innodb_files_extend.patch 2011-08-09 20:52:20 +0000 |
694 | +++ patches/innodb_files_extend.patch 2011-10-08 19:50:30 +0000 |
695 | @@ -109,7 +109,7 @@ |
696 | static my_bool innobase_thread_concurrency_timer_based; |
697 | static long long innobase_buffer_pool_size, innobase_log_file_size; |
698 | |
699 | -@@ -2321,6 +2324,65 @@ |
700 | +@@ -2323,6 +2326,65 @@ |
701 | } |
702 | #endif /* DBUG_OFF */ |
703 | |
704 | @@ -175,7 +175,7 @@ |
705 | #ifndef MYSQL_SERVER |
706 | innodb_overwrite_relay_log_info = FALSE; |
707 | #endif |
708 | -@@ -7252,9 +7314,9 @@ |
709 | +@@ -7256,9 +7318,9 @@ |
710 | | DICT_TF_COMPACT |
711 | | DICT_TF_FORMAT_ZIP |
712 | << DICT_TF_FORMAT_SHIFT; |
713 | @@ -188,7 +188,7 @@ |
714 | } |
715 | } |
716 | |
717 | -@@ -11443,6 +11505,16 @@ |
718 | +@@ -11447,6 +11509,16 @@ |
719 | "#### Attention: The checksum is not compatible for normal or disabled version! ####", |
720 | NULL, NULL, FALSE); |
721 | |
722 | @@ -205,7 +205,7 @@ |
723 | static MYSQL_SYSVAR_STR(data_home_dir, innobase_data_home_dir, |
724 | PLUGIN_VAR_READONLY, |
725 | "The common part for InnoDB table spaces.", |
726 | -@@ -11952,6 +12024,8 @@ |
727 | +@@ -11963,6 +12035,8 @@ |
728 | NULL, NULL, 0, &corrupt_table_action_typelib); |
729 | |
730 | static struct st_mysql_sys_var* innobase_system_variables[]= { |
731 | @@ -537,7 +537,7 @@ |
732 | readahead request. */ |
733 | --- a/storage/innobase/srv/srv0start.c |
734 | +++ b/storage/innobase/srv/srv0start.c |
735 | -@@ -1561,11 +1561,13 @@ |
736 | +@@ -1562,11 +1562,13 @@ |
737 | } |
738 | #endif /* UNIV_LOG_ARCHIVE */ |
739 | |
740 | @@ -553,7 +553,7 @@ |
741 | |
742 | return(DB_ERROR); |
743 | } |
744 | -@@ -1574,7 +1576,7 @@ |
745 | +@@ -1575,7 +1577,7 @@ |
746 | |
747 | for (i = 0; i < srv_n_data_files; i++) { |
748 | #ifndef __WIN__ |
749 | |
750 | === modified file 'patches/innodb_fix_misc.patch' |
751 | --- patches/innodb_fix_misc.patch 2011-08-09 20:52:20 +0000 |
752 | +++ patches/innodb_fix_misc.patch 2011-10-08 19:50:30 +0000 |
753 | @@ -452,7 +452,7 @@ |
754 | ut_a(ret); |
755 | --- a/storage/innobase/handler/ha_innodb.cc |
756 | +++ b/storage/innobase/handler/ha_innodb.cc |
757 | -@@ -12023,6 +12023,12 @@ |
758 | +@@ -12034,6 +12034,12 @@ |
759 | "except for the deletion.", |
760 | NULL, NULL, 0, &corrupt_table_action_typelib); |
761 | |
762 | @@ -465,7 +465,7 @@ |
763 | static struct st_mysql_sys_var* innobase_system_variables[]= { |
764 | MYSQL_SYSVAR(page_size), |
765 | MYSQL_SYSVAR(log_block_size), |
766 | -@@ -12114,6 +12120,7 @@ |
767 | +@@ -12126,6 +12132,7 @@ |
768 | MYSQL_SYSVAR(purge_batch_size), |
769 | MYSQL_SYSVAR(rollback_segments), |
770 | MYSQL_SYSVAR(corrupt_table_action), |
771 | @@ -473,7 +473,7 @@ |
772 | NULL |
773 | }; |
774 | |
775 | -@@ -12123,7 +12130,7 @@ |
776 | +@@ -12135,7 +12142,7 @@ |
777 | &innobase_storage_engine, |
778 | innobase_hton_name, |
779 | plugin_author, |
780 | @@ -877,7 +877,7 @@ |
781 | ut_error; |
782 | --- a/storage/innobase/srv/srv0srv.c |
783 | +++ b/storage/innobase/srv/srv0srv.c |
784 | -@@ -441,6 +441,8 @@ |
785 | +@@ -444,6 +444,8 @@ |
786 | UNIV_INTERN ulint srv_pass_corrupt_table = 0; /* 0:disable 1:enable */ |
787 | |
788 | UNIV_INTERN ulint srv_dict_size_limit = 0; |
789 | @@ -888,7 +888,7 @@ |
790 | UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500; |
791 | --- a/storage/innobase/srv/srv0start.c |
792 | +++ b/storage/innobase/srv/srv0start.c |
793 | -@@ -2161,7 +2161,7 @@ |
794 | +@@ -2167,7 +2167,7 @@ |
795 | if (srv_print_verbose_log) { |
796 | ut_print_timestamp(stderr); |
797 | fprintf(stderr, |
798 | |
799 | === renamed file 'innodb_kill_idle_transaction.patch' => 'patches/innodb_kill_idle_transaction.patch' |
800 | --- innodb_kill_idle_transaction.patch 2011-07-12 15:59:46 +0000 |
801 | +++ patches/innodb_kill_idle_transaction.patch 2011-10-08 19:50:30 +0000 |
802 | @@ -1,13 +1,12 @@ |
803 | # name : innodb_kill_idle_transaction.patch |
804 | -# introduced : 5.5.14 |
805 | +# introduced : 5.5.15 |
806 | # maintainer : Yasufumi |
807 | # |
808 | #!!! notice !!! |
809 | # Any small change to this file in the main branch |
810 | # should be done or reviewed by the maintainer! |
811 | -diff -ruN a/include/mysql/plugin.h b/include/mysql/plugin.h |
812 | ---- a/include/mysql/plugin.h 2011-06-22 01:42:39.000000000 +0900 |
813 | -+++ b/include/mysql/plugin.h 2011-07-12 22:19:58.000000000 +0900 |
814 | +--- a/include/mysql/plugin.h |
815 | ++++ b/include/mysql/plugin.h |
816 | @@ -625,6 +625,12 @@ |
817 | */ |
818 | void thd_set_ha_data(MYSQL_THD thd, const struct handlerton *hton, |
819 | @@ -21,9 +20,8 @@ |
820 | #ifdef __cplusplus |
821 | } |
822 | #endif |
823 | -diff -ruN a/include/mysql/plugin_audit.h.pp b/include/mysql/plugin_audit.h.pp |
824 | ---- a/include/mysql/plugin_audit.h.pp 2011-06-22 01:42:39.000000000 +0900 |
825 | -+++ b/include/mysql/plugin_audit.h.pp 2011-07-13 00:53:06.000000000 +0900 |
826 | +--- a/include/mysql/plugin_audit.h.pp |
827 | ++++ b/include/mysql/plugin_audit.h.pp |
828 | @@ -195,6 +195,9 @@ |
829 | void *thd_get_ha_data(const void* thd, const struct handlerton *hton); |
830 | void thd_set_ha_data(void* thd, const struct handlerton *hton, |
831 | @@ -34,9 +32,8 @@ |
832 | struct mysql_event_general |
833 | { |
834 | unsigned int event_subclass; |
835 | -diff -ruN a/include/mysql/plugin_auth.h.pp b/include/mysql/plugin_auth.h.pp |
836 | ---- a/include/mysql/plugin_auth.h.pp 2011-06-22 01:42:39.000000000 +0900 |
837 | -+++ b/include/mysql/plugin_auth.h.pp 2011-07-13 00:53:06.000000000 +0900 |
838 | +--- a/include/mysql/plugin_auth.h.pp |
839 | ++++ b/include/mysql/plugin_auth.h.pp |
840 | @@ -195,6 +195,9 @@ |
841 | void *thd_get_ha_data(const void* thd, const struct handlerton *hton); |
842 | void thd_set_ha_data(void* thd, const struct handlerton *hton, |
843 | @@ -47,9 +44,8 @@ |
844 | #include <mysql/plugin_auth_common.h> |
845 | typedef struct st_plugin_vio_info |
846 | { |
847 | -diff -ruN a/include/mysql/plugin_ftparser.h.pp b/include/mysql/plugin_ftparser.h.pp |
848 | ---- a/include/mysql/plugin_ftparser.h.pp 2011-06-22 01:42:39.000000000 +0900 |
849 | -+++ b/include/mysql/plugin_ftparser.h.pp 2011-07-13 00:53:06.000000000 +0900 |
850 | +--- a/include/mysql/plugin_ftparser.h.pp |
851 | ++++ b/include/mysql/plugin_ftparser.h.pp |
852 | @@ -148,6 +148,9 @@ |
853 | void *thd_get_ha_data(const void* thd, const struct handlerton *hton); |
854 | void thd_set_ha_data(void* thd, const struct handlerton *hton, |
855 | @@ -60,10 +56,9 @@ |
856 | enum enum_ftparser_mode |
857 | { |
858 | MYSQL_FTPARSER_SIMPLE_MODE= 0, |
859 | -diff -ruN a/sql/sql_class.cc b/sql/sql_class.cc |
860 | ---- a/sql/sql_class.cc 2011-06-22 01:42:40.000000000 +0900 |
861 | -+++ b/sql/sql_class.cc 2011-07-12 22:23:35.000000000 +0900 |
862 | -@@ -711,6 +711,26 @@ |
863 | +--- a/sql/sql_class.cc |
864 | ++++ b/sql/sql_class.cc |
865 | +@@ -713,6 +713,26 @@ |
866 | return buffer; |
867 | } |
868 | |
869 | @@ -90,10 +85,9 @@ |
870 | |
871 | /** |
872 | Implementation of Drop_table_error_handler::handle_condition(). |
873 | -diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc |
874 | ---- a/storage/innobase/handler/ha_innodb.cc 2011-07-12 17:10:37.000000000 +0900 |
875 | -+++ b/storage/innobase/handler/ha_innodb.cc 2011-07-12 22:33:06.000000000 +0900 |
876 | -@@ -2828,6 +2828,10 @@ |
877 | +--- a/storage/innobase/handler/ha_innodb.cc |
878 | ++++ b/storage/innobase/handler/ha_innodb.cc |
879 | +@@ -2831,6 +2831,10 @@ |
880 | |
881 | innobase_commit_concurrency_init_default(); |
882 | |
883 | @@ -104,7 +98,7 @@ |
884 | #ifdef HAVE_PSI_INTERFACE |
885 | /* Register keys with MySQL performance schema */ |
886 | if (PSI_server) { |
887 | -@@ -11586,6 +11590,48 @@ |
888 | +@@ -11589,6 +11593,48 @@ |
889 | return(false); |
890 | } |
891 | |
892 | @@ -153,7 +147,7 @@ |
893 | static SHOW_VAR innodb_status_variables_export[]= { |
894 | {"Innodb", (char*) &show_innodb_vars, SHOW_FUNC}, |
895 | {NullS, NullS, SHOW_LONG} |
896 | -@@ -11872,6 +11918,15 @@ |
897 | +@@ -11875,6 +11921,15 @@ |
898 | "Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got the ticket", |
899 | NULL, NULL, 500L, 1L, ~0L, 0); |
900 | |
901 | @@ -169,7 +163,7 @@ |
902 | static MYSQL_SYSVAR_LONG(file_io_threads, innobase_file_io_threads, |
903 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY | PLUGIN_VAR_NOSYSVAR, |
904 | "Number of file I/O threads in InnoDB.", |
905 | -@@ -12162,6 +12217,7 @@ |
906 | +@@ -12172,6 +12227,7 @@ |
907 | MYSQL_SYSVAR(fast_checksum), |
908 | MYSQL_SYSVAR(commit_concurrency), |
909 | MYSQL_SYSVAR(concurrency_tickets), |
910 | @@ -177,9 +171,8 @@ |
911 | MYSQL_SYSVAR(data_file_path), |
912 | MYSQL_SYSVAR(doublewrite_file), |
913 | MYSQL_SYSVAR(data_home_dir), |
914 | -diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h |
915 | ---- a/storage/innobase/include/srv0srv.h 2011-07-12 17:10:37.000000000 +0900 |
916 | -+++ b/storage/innobase/include/srv0srv.h 2011-07-12 22:33:57.000000000 +0900 |
917 | +--- a/storage/innobase/include/srv0srv.h |
918 | ++++ b/storage/innobase/include/srv0srv.h |
919 | @@ -291,6 +291,7 @@ |
920 | extern ulint srv_activity_count; |
921 | extern ulint srv_fatal_semaphore_wait_threshold; |
922 | @@ -188,9 +181,8 @@ |
923 | |
924 | extern mutex_t* kernel_mutex_temp;/* mutex protecting the server, trx structs, |
925 | query threads, and lock table: we allocate |
926 | -diff -ruN a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h |
927 | ---- a/storage/innobase/include/trx0trx.h 2011-07-12 16:47:24.000000000 +0900 |
928 | -+++ b/storage/innobase/include/trx0trx.h 2011-07-12 22:35:39.000000000 +0900 |
929 | +--- a/storage/innobase/include/trx0trx.h |
930 | ++++ b/storage/innobase/include/trx0trx.h |
931 | @@ -594,6 +594,8 @@ |
932 | replication has processed */ |
933 | const char* mysql_relay_log_file_name; |
934 | @@ -200,9 +192,8 @@ |
935 | /*------------------------------*/ |
936 | ulint n_mysql_tables_in_use; /* number of Innobase tables |
937 | used in the processing of the current |
938 | -diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c |
939 | ---- a/storage/innobase/srv/srv0srv.c 2011-07-12 17:10:37.000000000 +0900 |
940 | -+++ b/storage/innobase/srv/srv0srv.c 2011-07-12 22:43:22.000000000 +0900 |
941 | +--- a/storage/innobase/srv/srv0srv.c |
942 | ++++ b/storage/innobase/srv/srv0srv.c |
943 | @@ -87,6 +87,11 @@ |
944 | #include "mysql/plugin.h" |
945 | #include "mysql/service_thd_wait.h" |
946 | @@ -225,7 +216,7 @@ |
947 | /* How much data manipulation language (DML) statements need to be delayed, |
948 | in microseconds, in order to reduce the lagging of the purge thread. */ |
949 | UNIV_INTERN ulint srv_dml_needed_delay = 0; |
950 | -@@ -2826,6 +2834,36 @@ |
951 | +@@ -2829,6 +2837,36 @@ |
952 | old_sema = sema; |
953 | } |
954 | |
955 | @@ -262,9 +253,8 @@ |
956 | /* Flush stderr so that a database user gets the output |
957 | to possible MySQL error file */ |
958 | |
959 | -diff -ruN a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c |
960 | ---- a/storage/innobase/trx/trx0trx.c 2011-07-12 17:05:25.000000000 +0900 |
961 | -+++ b/storage/innobase/trx/trx0trx.c 2011-07-12 22:44:08.000000000 +0900 |
962 | +--- a/storage/innobase/trx/trx0trx.c |
963 | ++++ b/storage/innobase/trx/trx0trx.c |
964 | @@ -143,6 +143,9 @@ |
965 | trx->mysql_relay_log_file_name = ""; |
966 | trx->mysql_relay_log_pos = 0; |
967 | @@ -275,3 +265,165 @@ |
968 | mutex_create(trx_undo_mutex_key, &trx->undo_mutex, SYNC_TRX_UNDO); |
969 | |
970 | trx->rseg = NULL; |
971 | +--- /dev/null |
972 | ++++ b/mysql-test/r/percona_innodb_kill_idle_trx.result |
973 | +@@ -0,0 +1,41 @@ |
974 | ++DROP TABLE IF EXISTS t1; |
975 | ++SET autocommit=0; |
976 | ++CREATE TABLE t1 (a INT) ENGINE=InnoDB; |
977 | ++SHOW GLOBAL VARIABLES LIKE 'innodb_kill_idle_transaction'; |
978 | ++Variable_name Value |
979 | ++innodb_kill_idle_transaction 0 |
980 | ++SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction'; |
981 | ++VARIABLE_NAME VARIABLE_VALUE |
982 | ++INNODB_KILL_IDLE_TRANSACTION 0 |
983 | ++SET GLOBAL innodb_kill_idle_transaction=1; |
984 | ++SHOW GLOBAL VARIABLES LIKE 'innodb_kill_idle_transaction'; |
985 | ++Variable_name Value |
986 | ++innodb_kill_idle_transaction 1 |
987 | ++SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction'; |
988 | ++VARIABLE_NAME VARIABLE_VALUE |
989 | ++INNODB_KILL_IDLE_TRANSACTION 1 |
990 | ++BEGIN; |
991 | ++INSERT INTO t1 VALUES (1),(2),(3); |
992 | ++COMMIT; |
993 | ++SELECT * FROM t1; |
994 | ++a |
995 | ++1 |
996 | ++2 |
997 | ++3 |
998 | ++BEGIN; |
999 | ++INSERT INTO t1 VALUES (4),(5),(6); |
1000 | ++SELECT * FROM t1; |
1001 | ++ERROR HY000: MySQL server has gone away |
1002 | ++SELECT * FROM t1; |
1003 | ++a |
1004 | ++1 |
1005 | ++2 |
1006 | ++3 |
1007 | ++DROP TABLE t1; |
1008 | ++SET GLOBAL innodb_kill_idle_transaction=0; |
1009 | ++SHOW GLOBAL VARIABLES LIKE 'innodb_kill_idle_transaction'; |
1010 | ++Variable_name Value |
1011 | ++innodb_kill_idle_transaction 0 |
1012 | ++SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction'; |
1013 | ++VARIABLE_NAME VARIABLE_VALUE |
1014 | ++INNODB_KILL_IDLE_TRANSACTION 0 |
1015 | +--- /dev/null |
1016 | ++++ b/mysql-test/r/percona_innodb_kill_idle_trx_locks.result |
1017 | +@@ -0,0 +1,45 @@ |
1018 | ++DROP TABLE IF EXISTS t1; |
1019 | ++SET autocommit=0; |
1020 | ++CREATE TABLE t1 (a INT) ENGINE=InnoDB; |
1021 | ++SHOW GLOBAL VARIABLES LIKE 'innodb_kill_idle_transaction'; |
1022 | ++Variable_name Value |
1023 | ++innodb_kill_idle_transaction 0 |
1024 | ++SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction'; |
1025 | ++VARIABLE_NAME VARIABLE_VALUE |
1026 | ++INNODB_KILL_IDLE_TRANSACTION 0 |
1027 | ++SET GLOBAL innodb_kill_idle_transaction=5; |
1028 | ++SHOW GLOBAL VARIABLES LIKE 'innodb_kill_idle_transaction'; |
1029 | ++Variable_name Value |
1030 | ++innodb_kill_idle_transaction 5 |
1031 | ++SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction'; |
1032 | ++VARIABLE_NAME VARIABLE_VALUE |
1033 | ++INNODB_KILL_IDLE_TRANSACTION 5 |
1034 | ++BEGIN; |
1035 | ++INSERT INTO t1 VALUES (1),(2),(3); |
1036 | ++COMMIT; |
1037 | ++SELECT * FROM t1; |
1038 | ++a |
1039 | ++1 |
1040 | ++2 |
1041 | ++3 |
1042 | ++### Locking rows. Lock should be released when idle trx is killed. |
1043 | ++BEGIN; |
1044 | ++SELECT * FROM t1 FOR UPDATE; |
1045 | ++a |
1046 | ++1 |
1047 | ++2 |
1048 | ++3 |
1049 | ++UPDATE t1 set a=4; |
1050 | ++SELECT * FROM t1; |
1051 | ++a |
1052 | ++4 |
1053 | ++4 |
1054 | ++4 |
1055 | ++DROP TABLE t1; |
1056 | ++SET GLOBAL innodb_kill_idle_transaction=0; |
1057 | ++SHOW GLOBAL VARIABLES LIKE 'innodb_kill_idle_transaction'; |
1058 | ++Variable_name Value |
1059 | ++innodb_kill_idle_transaction 0 |
1060 | ++SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction'; |
1061 | ++VARIABLE_NAME VARIABLE_VALUE |
1062 | ++INNODB_KILL_IDLE_TRANSACTION 0 |
1063 | +--- /dev/null |
1064 | ++++ b/mysql-test/t/percona_innodb_kill_idle_trx.test |
1065 | +@@ -0,0 +1,28 @@ |
1066 | ++--source include/have_innodb.inc |
1067 | ++--disable_warnings |
1068 | ++DROP TABLE IF EXISTS t1; |
1069 | ++--enable_warnings |
1070 | ++ |
1071 | ++SET autocommit=0; |
1072 | ++CREATE TABLE t1 (a INT) ENGINE=InnoDB; |
1073 | ++ |
1074 | ++--source include/percona_innodb_kill_idle_trx_show.inc |
1075 | ++SET GLOBAL innodb_kill_idle_transaction=1; |
1076 | ++--source include/percona_innodb_kill_idle_trx_show.inc |
1077 | ++ |
1078 | ++BEGIN; |
1079 | ++INSERT INTO t1 VALUES (1),(2),(3); |
1080 | ++COMMIT; |
1081 | ++SELECT * FROM t1; |
1082 | ++ |
1083 | ++BEGIN; |
1084 | ++INSERT INTO t1 VALUES (4),(5),(6); |
1085 | ++sleep 3; |
1086 | ++ |
1087 | ++--enable_reconnect |
1088 | ++--error 2006 --error CR_SERVER_GONE_ERROR |
1089 | ++SELECT * FROM t1; |
1090 | ++SELECT * FROM t1; |
1091 | ++DROP TABLE t1; |
1092 | ++SET GLOBAL innodb_kill_idle_transaction=0; |
1093 | ++--source include/percona_innodb_kill_idle_trx_show.inc |
1094 | +--- /dev/null |
1095 | ++++ b/mysql-test/t/percona_innodb_kill_idle_trx_locks.test |
1096 | +@@ -0,0 +1,31 @@ |
1097 | ++--source include/have_innodb.inc |
1098 | ++--disable_warnings |
1099 | ++DROP TABLE IF EXISTS t1; |
1100 | ++--enable_warnings |
1101 | ++ |
1102 | ++SET autocommit=0; |
1103 | ++CREATE TABLE t1 (a INT) ENGINE=InnoDB; |
1104 | ++ |
1105 | ++--source include/percona_innodb_kill_idle_trx_show.inc |
1106 | ++SET GLOBAL innodb_kill_idle_transaction=5; |
1107 | ++--source include/percona_innodb_kill_idle_trx_show.inc |
1108 | ++ |
1109 | ++connect (conn1,localhost,root,,); |
1110 | ++connection conn1; |
1111 | ++ |
1112 | ++BEGIN; |
1113 | ++INSERT INTO t1 VALUES (1),(2),(3); |
1114 | ++COMMIT; |
1115 | ++SELECT * FROM t1; |
1116 | ++ |
1117 | ++--echo ### Locking rows. Lock should be released when idle trx is killed. |
1118 | ++BEGIN; |
1119 | ++SELECT * FROM t1 FOR UPDATE; |
1120 | ++ |
1121 | ++connection default; |
1122 | ++UPDATE t1 set a=4; |
1123 | ++ |
1124 | ++SELECT * FROM t1; |
1125 | ++DROP TABLE t1; |
1126 | ++SET GLOBAL innodb_kill_idle_transaction=0; |
1127 | ++--source include/percona_innodb_kill_idle_trx_show.inc |
1128 | +--- /dev/null |
1129 | ++++ b/mysql-test/include/percona_innodb_kill_idle_trx_show.inc |
1130 | +@@ -0,0 +1,2 @@ |
1131 | ++SHOW GLOBAL VARIABLES LIKE 'innodb_kill_idle_transaction'; |
1132 | ++SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction'; |
1133 | |
1134 | === modified file 'patches/innodb_pass_corrupt_table.patch' |
1135 | --- patches/innodb_pass_corrupt_table.patch 2011-09-27 16:49:00 +0000 |
1136 | +++ patches/innodb_pass_corrupt_table.patch 2011-10-08 19:50:30 +0000 |
1137 | @@ -787,7 +787,7 @@ |
1138 | if (descr != NULL) { |
1139 | --- a/storage/innobase/handler/ha_innodb.cc |
1140 | +++ b/storage/innobase/handler/ha_innodb.cc |
1141 | -@@ -3979,6 +3979,12 @@ |
1142 | +@@ -3983,6 +3983,12 @@ |
1143 | DBUG_RETURN(1); |
1144 | } |
1145 | |
1146 | @@ -800,7 +800,7 @@ |
1147 | /* Create buffers for packing the fields of a record. Why |
1148 | table->reclength did not work here? Obviously, because char |
1149 | fields when packed actually became 1 byte longer, when we also |
1150 | -@@ -4006,6 +4012,19 @@ |
1151 | +@@ -4010,6 +4016,19 @@ |
1152 | /* Get pointer to a table object in InnoDB dictionary cache */ |
1153 | ib_table = dict_table_get(norm_name, TRUE); |
1154 | |
1155 | @@ -820,7 +820,7 @@ |
1156 | if (NULL == ib_table) { |
1157 | if (is_part && retries < 10) { |
1158 | ++retries; |
1159 | -@@ -5174,6 +5193,10 @@ |
1160 | +@@ -5178,6 +5197,10 @@ |
1161 | |
1162 | ha_statistic_increment(&SSV::ha_write_count); |
1163 | |
1164 | @@ -831,7 +831,7 @@ |
1165 | if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT) |
1166 | table->timestamp_field->set_time(); |
1167 | |
1168 | -@@ -5391,6 +5414,10 @@ |
1169 | +@@ -5395,6 +5418,10 @@ |
1170 | func_exit: |
1171 | innobase_active_small(); |
1172 | |
1173 | @@ -842,7 +842,7 @@ |
1174 | DBUG_RETURN(error_result); |
1175 | } |
1176 | |
1177 | -@@ -5567,6 +5594,10 @@ |
1178 | +@@ -5571,6 +5598,10 @@ |
1179 | |
1180 | ha_statistic_increment(&SSV::ha_update_count); |
1181 | |
1182 | @@ -853,7 +853,7 @@ |
1183 | if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE) |
1184 | table->timestamp_field->set_time(); |
1185 | |
1186 | -@@ -5656,6 +5687,10 @@ |
1187 | +@@ -5660,6 +5691,10 @@ |
1188 | |
1189 | innobase_active_small(); |
1190 | |
1191 | @@ -864,7 +864,7 @@ |
1192 | DBUG_RETURN(error); |
1193 | } |
1194 | |
1195 | -@@ -5677,6 +5712,10 @@ |
1196 | +@@ -5681,6 +5716,10 @@ |
1197 | |
1198 | ha_statistic_increment(&SSV::ha_delete_count); |
1199 | |
1200 | @@ -875,7 +875,7 @@ |
1201 | if (!prebuilt->upd_node) { |
1202 | row_get_prebuilt_update_vector(prebuilt); |
1203 | } |
1204 | -@@ -5703,6 +5742,10 @@ |
1205 | +@@ -5707,6 +5746,10 @@ |
1206 | |
1207 | innobase_active_small(); |
1208 | |
1209 | @@ -886,7 +886,7 @@ |
1210 | DBUG_RETURN(error); |
1211 | } |
1212 | |
1213 | -@@ -5942,6 +5985,10 @@ |
1214 | +@@ -5946,6 +5989,10 @@ |
1215 | |
1216 | ha_statistic_increment(&SSV::ha_read_key_count); |
1217 | |
1218 | @@ -897,7 +897,7 @@ |
1219 | index = prebuilt->index; |
1220 | |
1221 | if (UNIV_UNLIKELY(index == NULL)) { |
1222 | -@@ -6007,6 +6054,10 @@ |
1223 | +@@ -6011,6 +6058,10 @@ |
1224 | ret = DB_UNSUPPORTED; |
1225 | } |
1226 | |
1227 | @@ -908,7 +908,7 @@ |
1228 | switch (ret) { |
1229 | case DB_SUCCESS: |
1230 | error = 0; |
1231 | -@@ -6122,6 +6173,10 @@ |
1232 | +@@ -6126,6 +6177,10 @@ |
1233 | { |
1234 | DBUG_ENTER("change_active_index"); |
1235 | |
1236 | @@ -919,7 +919,7 @@ |
1237 | ut_ad(user_thd == ha_thd()); |
1238 | ut_a(prebuilt->trx == thd_to_trx(user_thd)); |
1239 | |
1240 | -@@ -6212,6 +6267,10 @@ |
1241 | +@@ -6216,6 +6271,10 @@ |
1242 | |
1243 | DBUG_ENTER("general_fetch"); |
1244 | |
1245 | @@ -930,7 +930,7 @@ |
1246 | ut_a(prebuilt->trx == thd_to_trx(user_thd)); |
1247 | |
1248 | innodb_srv_conc_enter_innodb(prebuilt->trx); |
1249 | -@@ -6221,6 +6280,10 @@ |
1250 | +@@ -6225,6 +6284,10 @@ |
1251 | |
1252 | innodb_srv_conc_exit_innodb(prebuilt->trx); |
1253 | |
1254 | @@ -941,7 +941,7 @@ |
1255 | switch (ret) { |
1256 | case DB_SUCCESS: |
1257 | error = 0; |
1258 | -@@ -7487,10 +7550,18 @@ |
1259 | +@@ -7491,10 +7554,18 @@ |
1260 | |
1261 | update_thd(ha_thd()); |
1262 | |
1263 | @@ -960,7 +960,7 @@ |
1264 | error = convert_error_code_to_mysql(error, prebuilt->table->flags, |
1265 | NULL); |
1266 | |
1267 | -@@ -7991,6 +8062,16 @@ |
1268 | +@@ -7995,6 +8066,16 @@ |
1269 | return(ranges + (double) rows / (double) total_rows * time_for_scan); |
1270 | } |
1271 | |
1272 | @@ -977,7 +977,7 @@ |
1273 | /*********************************************************************//** |
1274 | Calculates the key number used inside MySQL for an Innobase index. We will |
1275 | first check the "index translation table" for a match of the index to get |
1276 | -@@ -8168,7 +8249,7 @@ |
1277 | +@@ -8172,7 +8253,7 @@ |
1278 | ib_table = prebuilt->table; |
1279 | |
1280 | if (flag & HA_STATUS_TIME) { |
1281 | @@ -986,7 +986,7 @@ |
1282 | /* In sql_show we call with this flag: update |
1283 | then statistics so that they are up-to-date */ |
1284 | |
1285 | -@@ -8461,10 +8542,18 @@ |
1286 | +@@ -8465,10 +8546,18 @@ |
1287 | THD* thd, /*!< in: connection thread handle */ |
1288 | HA_CHECK_OPT* check_opt) /*!< in: currently ignored */ |
1289 | { |
1290 | @@ -1005,7 +1005,7 @@ |
1291 | return(0); |
1292 | } |
1293 | |
1294 | -@@ -8646,6 +8735,10 @@ |
1295 | +@@ -8650,6 +8739,10 @@ |
1296 | my_error(ER_QUERY_INTERRUPTED, MYF(0)); |
1297 | } |
1298 | |
1299 | @@ -1016,7 +1016,7 @@ |
1300 | DBUG_RETURN(is_ok ? HA_ADMIN_OK : HA_ADMIN_CORRUPT); |
1301 | } |
1302 | |
1303 | -@@ -9416,6 +9509,10 @@ |
1304 | +@@ -9420,6 +9513,10 @@ |
1305 | |
1306 | update_thd(thd); |
1307 | |
1308 | @@ -1027,9 +1027,9 @@ |
1309 | if (prebuilt->table->ibd_file_missing && !thd_tablespace_op(thd)) { |
1310 | ut_print_timestamp(stderr); |
1311 | fprintf(stderr, |
1312 | -@@ -11823,6 +11920,26 @@ |
1313 | - "0 (the default) disables automatic dumps.", |
1314 | - NULL, NULL, 0, 0, UINT_MAX32, 0); |
1315 | +@@ -11834,6 +11931,26 @@ |
1316 | + "dump file (if present). Disabled by default.", |
1317 | + NULL, NULL, FALSE); |
1318 | |
1319 | +const char *corrupt_table_action_names[]= |
1320 | +{ |
1321 | @@ -1054,7 +1054,7 @@ |
1322 | static struct st_mysql_sys_var* innobase_system_variables[]= { |
1323 | MYSQL_SYSVAR(additional_mem_pool_size), |
1324 | MYSQL_SYSVAR(autoextend_increment), |
1325 | -@@ -11910,6 +12027,7 @@ |
1326 | +@@ -11922,6 +12039,7 @@ |
1327 | MYSQL_SYSVAR(purge_threads), |
1328 | MYSQL_SYSVAR(purge_batch_size), |
1329 | MYSQL_SYSVAR(rollback_segments), |
1330 | @@ -1349,7 +1349,7 @@ |
1331 | fprintf(stderr, |
1332 | --- a/storage/innobase/srv/srv0srv.c |
1333 | +++ b/storage/innobase/srv/srv0srv.c |
1334 | -@@ -430,6 +430,7 @@ |
1335 | +@@ -433,6 +433,7 @@ |
1336 | UNIV_INTERN ulint srv_adaptive_flushing_method = 0; /* 0: native 1: estimate 2: keep_average */ |
1337 | |
1338 | UNIV_INTERN ulint srv_expand_import = 0; /* 0:disable 1:enable */ |
1339 | @@ -1359,7 +1359,7 @@ |
1340 | /*-------------------------------------------*/ |
1341 | --- a/storage/innobase/srv/srv0start.c |
1342 | +++ b/storage/innobase/srv/srv0start.c |
1343 | -@@ -2149,6 +2149,13 @@ |
1344 | +@@ -2155,6 +2155,13 @@ |
1345 | |
1346 | os_fast_mutex_free(&srv_os_test_mutex); |
1347 | |
1348 | |
1349 | === modified file 'patches/innodb_separate_doublewrite.patch' |
1350 | --- patches/innodb_separate_doublewrite.patch 2011-09-03 15:15:31 +0000 |
1351 | +++ patches/innodb_separate_doublewrite.patch 2011-10-08 19:50:30 +0000 |
1352 | @@ -341,7 +341,7 @@ |
1353 | |
1354 | /* The highest file format being used in the database. The value can be |
1355 | set by user, however, it will be adjusted to the newer file format if |
1356 | -@@ -2477,6 +2478,8 @@ |
1357 | +@@ -2479,6 +2480,8 @@ |
1358 | goto error; |
1359 | } |
1360 | |
1361 | @@ -350,7 +350,7 @@ |
1362 | srv_use_sys_stats_table = (ibool) innobase_use_sys_stats_table; |
1363 | |
1364 | /* -------------- Log files ---------------------------*/ |
1365 | -@@ -11657,6 +11660,11 @@ |
1366 | +@@ -11661,6 +11664,11 @@ |
1367 | "Path to individual files and their sizes.", |
1368 | NULL, NULL, NULL); |
1369 | |
1370 | @@ -362,7 +362,7 @@ |
1371 | static MYSQL_SYSVAR_LONG(autoinc_lock_mode, innobase_autoinc_lock_mode, |
1372 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, |
1373 | "The AUTOINC lock modes supported by InnoDB: " |
1374 | -@@ -11824,6 +11832,7 @@ |
1375 | +@@ -11835,6 +11843,7 @@ |
1376 | MYSQL_SYSVAR(commit_concurrency), |
1377 | MYSQL_SYSVAR(concurrency_tickets), |
1378 | MYSQL_SYSVAR(data_file_path), |
1379 | @@ -528,7 +528,7 @@ |
1380 | /* if TRUE, then we auto-extend the last data file */ |
1381 | --- a/storage/innobase/srv/srv0start.c |
1382 | +++ b/storage/innobase/srv/srv0start.c |
1383 | -@@ -714,6 +714,7 @@ |
1384 | +@@ -715,6 +715,7 @@ |
1385 | /*======================*/ |
1386 | ibool* create_new_db, /*!< out: TRUE if new database should be |
1387 | created */ |
1388 | @@ -536,7 +536,7 @@ |
1389 | #ifdef UNIV_LOG_ARCHIVE |
1390 | ulint* min_arch_log_no,/*!< out: min of archived log |
1391 | numbers in data files */ |
1392 | -@@ -746,6 +747,7 @@ |
1393 | +@@ -747,6 +748,7 @@ |
1394 | *sum_of_new_sizes = 0; |
1395 | |
1396 | *create_new_db = FALSE; |
1397 | @@ -544,7 +544,7 @@ |
1398 | |
1399 | srv_normalize_path_for_win(srv_data_home); |
1400 | |
1401 | -@@ -983,6 +985,142 @@ |
1402 | +@@ -984,6 +986,142 @@ |
1403 | srv_data_file_is_raw_partition[i] != 0); |
1404 | } |
1405 | |
1406 | @@ -687,7 +687,7 @@ |
1407 | return(DB_SUCCESS); |
1408 | } |
1409 | |
1410 | -@@ -996,6 +1134,7 @@ |
1411 | +@@ -997,6 +1135,7 @@ |
1412 | /*====================================*/ |
1413 | { |
1414 | ibool create_new_db; |
1415 | @@ -695,7 +695,7 @@ |
1416 | ibool log_file_created; |
1417 | ibool log_created = FALSE; |
1418 | ibool log_opened = FALSE; |
1419 | -@@ -1461,6 +1600,7 @@ |
1420 | +@@ -1462,6 +1601,7 @@ |
1421 | } |
1422 | |
1423 | err = open_or_create_data_files(&create_new_db, |
1424 | @@ -703,7 +703,7 @@ |
1425 | #ifdef UNIV_LOG_ARCHIVE |
1426 | &min_arch_log_no, &max_arch_log_no, |
1427 | #endif /* UNIV_LOG_ARCHIVE */ |
1428 | -@@ -1628,6 +1768,14 @@ |
1429 | +@@ -1629,6 +1769,14 @@ |
1430 | after the double write buffer has been created. */ |
1431 | trx_sys_create(); |
1432 | |
1433 | @@ -718,7 +718,7 @@ |
1434 | dict_create(); |
1435 | |
1436 | srv_startup_is_before_trx_rollback_phase = FALSE; |
1437 | -@@ -1661,6 +1809,13 @@ |
1438 | +@@ -1662,6 +1810,13 @@ |
1439 | recv_recovery_from_archive_finish(); |
1440 | #endif /* UNIV_LOG_ARCHIVE */ |
1441 | } else { |
1442 | @@ -732,7 +732,7 @@ |
1443 | |
1444 | /* Check if we support the max format that is stamped |
1445 | on the system tablespace. |
1446 | -@@ -1747,6 +1902,17 @@ |
1447 | +@@ -1748,6 +1903,17 @@ |
1448 | we have finished the recovery process so that the |
1449 | image of TRX_SYS_PAGE_NO is not stale. */ |
1450 | trx_sys_file_format_tag_init(); |
1451 | |
1452 | === modified file 'patches/innodb_show_status_extend.patch' |
1453 | --- patches/innodb_show_status_extend.patch 2011-08-09 20:52:20 +0000 |
1454 | +++ patches/innodb_show_status_extend.patch 2011-10-08 19:50:30 +0000 |
1455 | @@ -7,7 +7,7 @@ |
1456 | # should be done or reviewed by the maintainer! |
1457 | --- a/storage/innobase/handler/ha_innodb.cc |
1458 | +++ b/storage/innobase/handler/ha_innodb.cc |
1459 | -@@ -639,6 +639,16 @@ |
1460 | +@@ -641,6 +641,16 @@ |
1461 | trx_t* trx); /*!< in: transaction handle */ |
1462 | |
1463 | static SHOW_VAR innodb_status_variables[]= { |
1464 | @@ -24,7 +24,7 @@ |
1465 | {"buffer_pool_pages_data", |
1466 | (char*) &export_vars.innodb_buffer_pool_pages_data, SHOW_LONG}, |
1467 | {"buffer_pool_pages_dirty", |
1468 | -@@ -653,8 +663,14 @@ |
1469 | +@@ -655,8 +665,14 @@ |
1470 | {"buffer_pool_pages_latched", |
1471 | (char*) &export_vars.innodb_buffer_pool_pages_latched, SHOW_LONG}, |
1472 | #endif /* UNIV_DEBUG */ |
1473 | @@ -39,7 +39,7 @@ |
1474 | {"buffer_pool_pages_total", |
1475 | (char*) &export_vars.innodb_buffer_pool_pages_total, SHOW_LONG}, |
1476 | {"buffer_pool_read_ahead", |
1477 | -@@ -669,6 +685,12 @@ |
1478 | +@@ -671,6 +687,12 @@ |
1479 | (char*) &export_vars.innodb_buffer_pool_wait_free, SHOW_LONG}, |
1480 | {"buffer_pool_write_requests", |
1481 | (char*) &export_vars.innodb_buffer_pool_write_requests, SHOW_LONG}, |
1482 | @@ -52,7 +52,7 @@ |
1483 | {"data_fsyncs", |
1484 | (char*) &export_vars.innodb_data_fsyncs, SHOW_LONG}, |
1485 | {"data_pending_fsyncs", |
1486 | -@@ -695,12 +717,66 @@ |
1487 | +@@ -697,12 +719,66 @@ |
1488 | (char*) &export_vars.innodb_dict_tables, SHOW_LONG}, |
1489 | {"have_atomic_builtins", |
1490 | (char*) &export_vars.innodb_have_atomic_builtins, SHOW_BOOL}, |
1491 | @@ -119,7 +119,7 @@ |
1492 | {"os_log_fsyncs", |
1493 | (char*) &export_vars.innodb_os_log_fsyncs, SHOW_LONG}, |
1494 | {"os_log_pending_fsyncs", |
1495 | -@@ -717,8 +793,14 @@ |
1496 | +@@ -719,8 +795,14 @@ |
1497 | (char*) &export_vars.innodb_pages_read, SHOW_LONG}, |
1498 | {"pages_written", |
1499 | (char*) &export_vars.innodb_pages_written, SHOW_LONG}, |
1500 | @@ -134,7 +134,7 @@ |
1501 | {"row_lock_time", |
1502 | (char*) &export_vars.innodb_row_lock_time, SHOW_LONGLONG}, |
1503 | {"row_lock_time_avg", |
1504 | -@@ -735,8 +817,20 @@ |
1505 | +@@ -737,8 +819,20 @@ |
1506 | (char*) &export_vars.innodb_rows_read, SHOW_LONG}, |
1507 | {"rows_updated", |
1508 | (char*) &export_vars.innodb_rows_updated, SHOW_LONG}, |
1509 | @@ -240,7 +240,7 @@ |
1510 | /** The lock system */ |
1511 | --- a/storage/innobase/include/srv0srv.h |
1512 | +++ b/storage/innobase/include/srv0srv.h |
1513 | -@@ -731,6 +731,11 @@ |
1514 | +@@ -734,6 +734,11 @@ |
1515 | |
1516 | /** Status variables to be passed to MySQL */ |
1517 | struct export_var_struct{ |
1518 | @@ -252,7 +252,7 @@ |
1519 | ulint innodb_data_pending_reads; /*!< Pending reads */ |
1520 | ulint innodb_data_pending_writes; /*!< Pending writes */ |
1521 | ulint innodb_data_pending_fsyncs; /*!< Pending fsyncs */ |
1522 | -@@ -748,6 +753,9 @@ |
1523 | +@@ -751,6 +756,9 @@ |
1524 | #ifdef UNIV_DEBUG |
1525 | ulint innodb_buffer_pool_pages_latched; /*!< Latched pages */ |
1526 | #endif /* UNIV_DEBUG */ |
1527 | @@ -262,7 +262,7 @@ |
1528 | ulint innodb_buffer_pool_read_requests; /*!< buf_pool->stat.n_page_gets */ |
1529 | ulint innodb_buffer_pool_reads; /*!< srv_buf_pool_reads */ |
1530 | ulint innodb_buffer_pool_wait_free; /*!< srv_buf_pool_wait_free */ |
1531 | -@@ -756,13 +764,43 @@ |
1532 | +@@ -759,13 +767,43 @@ |
1533 | ulint innodb_buffer_pool_write_requests;/*!< srv_buf_pool_write_requests */ |
1534 | ulint innodb_buffer_pool_read_ahead; /*!< srv_read_ahead */ |
1535 | ulint innodb_buffer_pool_read_ahead_evicted;/*!< srv_read_ahead evicted*/ |
1536 | @@ -306,7 +306,7 @@ |
1537 | ulint innodb_os_log_written; /*!< srv_os_log_written */ |
1538 | ulint innodb_os_log_fsyncs; /*!< fil_n_log_flushes */ |
1539 | ulint innodb_os_log_pending_writes; /*!< srv_os_log_pending_writes */ |
1540 | -@@ -771,6 +809,8 @@ |
1541 | +@@ -774,6 +812,8 @@ |
1542 | ulint innodb_pages_created; /*!< buf_pool->stat.n_pages_created */ |
1543 | ulint innodb_pages_read; /*!< buf_pool->stat.n_pages_read */ |
1544 | ulint innodb_pages_written; /*!< buf_pool->stat.n_pages_written */ |
1545 | @@ -315,7 +315,7 @@ |
1546 | ulint innodb_row_lock_waits; /*!< srv_n_lock_wait_count */ |
1547 | ulint innodb_row_lock_current_waits; /*!< srv_n_lock_wait_current_count */ |
1548 | ib_int64_t innodb_row_lock_time; /*!< srv_n_lock_wait_time |
1549 | -@@ -780,11 +820,18 @@ |
1550 | +@@ -783,11 +823,18 @@ |
1551 | / srv_n_lock_wait_count */ |
1552 | ulint innodb_row_lock_time_max; /*!< srv_n_lock_max_wait_time |
1553 | / 1000 */ |
1554 | @@ -383,7 +383,7 @@ |
1555 | } |
1556 | --- a/storage/innobase/srv/srv0srv.c |
1557 | +++ b/storage/innobase/srv/srv0srv.c |
1558 | -@@ -2253,12 +2253,49 @@ |
1559 | +@@ -2256,12 +2256,49 @@ |
1560 | ulint LRU_len; |
1561 | ulint free_len; |
1562 | ulint flush_list_len; |
1563 | @@ -433,7 +433,7 @@ |
1564 | export_vars.innodb_data_pending_reads |
1565 | = os_n_pending_reads; |
1566 | export_vars.innodb_data_pending_writes |
1567 | -@@ -2295,6 +2332,92 @@ |
1568 | +@@ -2298,6 +2335,92 @@ |
1569 | |
1570 | export_vars.innodb_buffer_pool_pages_misc |
1571 | = buf_pool_get_n_pages() - LRU_len - free_len; |
1572 | |
1573 | === modified file 'patches/mysql-test.diff' |
1574 | --- patches/mysql-test.diff 2011-10-07 09:15:06 +0000 |
1575 | +++ patches/mysql-test.diff 2011-10-08 19:50:30 +0000 |
1576 | @@ -1085,7 +1085,7 @@ |
1577 | drop table t2; |
1578 | --- a/mysql-test/suite/sys_vars/r/all_vars.result |
1579 | +++ b/mysql-test/suite/sys_vars/r/all_vars.result |
1580 | -@@ -1,23 +1,23 @@ |
1581 | +@@ -1,23 +1,27 @@ |
1582 | create table t1 (test_name text); |
1583 | create table t2 (variable_name text); |
1584 | load data infile "MYSQLTEST_VARDIR/tmp/sys_vars.all_vars.txt" into table t1; |
1585 | @@ -1104,8 +1104,12 @@ |
1586 | There should be *no* variables listed below: |
1587 | -INNODB_ROLLBACK_SEGMENTS |
1588 | -INNODB_STATS_METHOD |
1589 | ++INNODB_FAKE_CHANGES |
1590 | ++INNODB_FAKE_CHANGES |
1591 | INNODB_FILE_FORMAT_MAX |
1592 | +INNODB_FILE_FORMAT_MAX |
1593 | ++INNODB_KILL_IDLE_TRANSACTION |
1594 | ++INNODB_KILL_IDLE_TRANSACTION |
1595 | +INNODB_LARGE_PREFIX |
1596 | INNODB_LARGE_PREFIX |
1597 | INNODB_ROLLBACK_SEGMENTS |
1598 | |
1599 | === modified file 'patches/series' |
1600 | --- patches/series 2011-10-06 02:01:55 +0000 |
1601 | +++ patches/series 2011-10-08 19:50:30 +0000 |
1602 | @@ -29,6 +29,8 @@ |
1603 | innodb_buffer_pool_pages_i_s.patch |
1604 | innodb_buffer_pool_shm.patch |
1605 | innodb_show_status_extend.patch |
1606 | +innodb_kill_idle_transaction.patch |
1607 | +innodb_fake_changes.patch |
1608 | slow_extended.patch |
1609 | percona_support.patch |
1610 | query_cache_enhance.patch |
in future, please run through Jenkins so that I don't have to fix up failing tests.