~tsarev/percona-server/5.5_slow_extended_bugs_slow_extended_bugs

« back to all changes in this revision

Viewing changes to innodb_fix_misc.patch

  • Committer: kinoyasu
  • Date: 2011-06-10 06:51:54 UTC
  • mfrom: (111.3.1 5.5.12-tmp)
  • Revision ID: kinoyasu@gauntlet4-20110610065154-l7utm5groktcr93q
5.5.12-corrupt_table_salvage is merged: add new action for innodb_corrupt_table_action = salvage

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
14
14
--- a/storage/innobase/buf/buf0buf.c    2011-02-23 19:00:48.178696354 +0900
15
15
+++ b/storage/innobase/buf/buf0buf.c    2011-02-23 19:01:19.138826278 +0900
16
 
@@ -4063,6 +4063,7 @@
 
16
@@ -4061,6 +4061,7 @@
17
17
                bpage->state    = BUF_BLOCK_ZIP_PAGE;
18
18
                bpage->space    = space;
19
19
                bpage->offset   = offset;
216
216
+           && ((buf_page_t*)message)->space_was_being_deleted) {
217
217
+
218
218
+               if (mode == OS_AIO_NORMAL) {
219
 
+                       buf_page_io_complete(message, trx);
 
219
+                       buf_page_io_complete(message);
220
220
+                       return(DB_SUCCESS); /*fake*/
221
221
+               }
222
222
+               if (type == OS_FILE_READ) {
229
229
        /* Reserve the fil_system mutex and make sure that we can open at
230
230
        least one file while holding it, if the file is not already open */
231
231
 
232
 
@@ -5311,10 +5344,24 @@
 
232
@@ -5323,10 +5356,24 @@
233
233
 #else
234
234
        /* Queue the aio request */
235
235
        ret = os_aio(type, mode | wake_later, node->name, node->handle, buf,
255
255
        ut_a(ret);
256
256
 
257
257
        if (mode == OS_AIO_SYNC) {
258
 
@@ -5414,6 +5461,7 @@
 
258
@@ -5426,6 +5473,7 @@
259
259
        fil_node_t*     fil_node;
260
260
        void*           message;
261
261
        ulint           type;
263
263
 
264
264
        ut_ad(fil_validate_skip());
265
265
 
266
 
@@ -5421,10 +5469,10 @@
 
266
@@ -5433,10 +5481,10 @@
267
267
                srv_set_io_thread_op_info(segment, "native aio handle");
268
268
 #ifdef WIN_ASYNC_IO
269
269
                ret = os_aio_windows_handle(segment, 0, &fil_node,
276
276
 #else
277
277
                ret = 0; /* Eliminate compiler warning */
278
278
                ut_error;
279
 
@@ -5433,7 +5481,22 @@
 
279
@@ -5445,7 +5493,22 @@
280
280
                srv_set_io_thread_op_info(segment, "simulated aio handle");
281
281
 
282
282
                ret = os_aio_simulated_handle(segment, &fil_node,
295
295
+                    || buf_page_get_state(message) != BUF_BLOCK_FILE_PAGE);
296
296
+
297
297
+               srv_set_io_thread_op_info(segment, "complete io for buf page");
298
 
+               buf_page_io_complete(message, NULL);
 
298
+               buf_page_io_complete(message);
299
299
+               return;
300
300
        }
301
301
 
303
303
diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
304
304
--- a/storage/innobase/handler/ha_innodb.cc     2010-12-04 15:57:13.035513990 +0900
305
305
+++ b/storage/innobase/handler/ha_innodb.cc     2010-12-04 15:57:53.084513775 +0900
306
 
@@ -11999,6 +11999,12 @@
 
306
@@ -12000,6 +12000,12 @@
307
307
   "except for the deletion.",
308
308
   NULL, NULL, 0, &corrupt_table_action_typelib);
309
309
 
316
316
 static struct st_mysql_sys_var* innobase_system_variables[]= {
317
317
   MYSQL_SYSVAR(page_size),
318
318
   MYSQL_SYSVAR(log_block_size),
319
 
@@ -12089,6 +12095,7 @@
 
319
@@ -12090,6 +12096,7 @@
320
320
   MYSQL_SYSVAR(purge_batch_size),
321
321
   MYSQL_SYSVAR(rollback_segments),
322
322
   MYSQL_SYSVAR(corrupt_table_action),
324
324
   NULL
325
325
 };
326
326
 
327
 
@@ -12098,7 +12105,7 @@
 
327
@@ -12099,7 +12106,7 @@
328
328
   &innobase_storage_engine,
329
329
   innobase_hton_name,
330
330
   plugin_author,
336
336
diff -ruN a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h
337
337
--- a/storage/innobase/include/buf0buf.h        2011-02-23 19:00:48.252696774 +0900
338
338
+++ b/storage/innobase/include/buf0buf.h        2011-02-23 19:01:19.182655902 +0900
339
 
@@ -1439,6 +1439,7 @@
 
339
@@ -1438,6 +1438,7 @@
340
340
                                        0 if the block was never accessed
341
341
                                        in the buffer pool */
342
342
        /* @} */