~percona-dev/percona-xtradb/fix-bug547230-bug548442

« back to all changes in this revision

Viewing changes to innodb_extend_slow.patch

add recovery statistics output when crash recovery (disabled by default)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
diff -ruN innodb_plugin-1.0.6_orig/buf/buf0buf.c innodb_plugin-1.0.6_tmp/buf/buf0buf.c
2
 
--- innodb_plugin-1.0.6_orig/buf/buf0buf.c      2009-12-04 12:13:50.000000000 +0900
3
 
+++ innodb_plugin-1.0.6_tmp/buf/buf0buf.c       2009-12-04 14:13:57.000000000 +0900
 
2
--- innodb_plugin-1.0.6_orig/buf/buf0buf.c      2009-12-10 17:17:01.000000000 +0900
 
3
+++ innodb_plugin-1.0.6_tmp/buf/buf0buf.c       2009-12-10 17:48:12.000000000 +0900
4
4
@@ -51,6 +51,40 @@
5
5
 #include "dict0dict.h"
6
6
 #include "log0recv.h"
232
232
 }
233
233
 
234
234
diff -ruN innodb_plugin-1.0.6_orig/buf/buf0rea.c innodb_plugin-1.0.6_tmp/buf/buf0rea.c
235
 
--- innodb_plugin-1.0.6_orig/buf/buf0rea.c      2009-12-04 12:28:57.000000000 +0900
236
 
+++ innodb_plugin-1.0.6_tmp/buf/buf0rea.c       2009-12-04 14:13:57.000000000 +0900
 
235
--- innodb_plugin-1.0.6_orig/buf/buf0rea.c      2009-12-10 17:27:16.000000000 +0900
 
236
+++ innodb_plugin-1.0.6_tmp/buf/buf0rea.c       2009-12-10 17:48:12.000000000 +0900
237
237
@@ -75,7 +75,8 @@
238
238
                        treat the tablespace as dropped; this is a timestamp we
239
239
                        use to stop dangling page reads from a tablespace
328
328
        }
329
329
 
330
330
diff -ruN innodb_plugin-1.0.6_orig/fil/fil0fil.c innodb_plugin-1.0.6_tmp/fil/fil0fil.c
331
 
--- innodb_plugin-1.0.6_orig/fil/fil0fil.c      2009-12-04 12:15:57.000000000 +0900
332
 
+++ innodb_plugin-1.0.6_tmp/fil/fil0fil.c       2009-12-04 14:13:57.000000000 +0900
 
331
--- innodb_plugin-1.0.6_orig/fil/fil0fil.c      2009-12-10 17:17:01.000000000 +0900
 
332
+++ innodb_plugin-1.0.6_tmp/fil/fil0fil.c       2009-12-10 17:48:12.000000000 +0900
333
333
@@ -4199,7 +4199,7 @@
334
334
                                 node->name, node->handle, buf,
335
335
                                 offset_low, offset_high,
369
369
        ut_a(ret);
370
370
 
371
371
diff -ruN innodb_plugin-1.0.6_orig/handler/ha_innodb.cc innodb_plugin-1.0.6_tmp/handler/ha_innodb.cc
372
 
--- innodb_plugin-1.0.6_orig/handler/ha_innodb.cc       2009-12-04 14:13:06.000000000 +0900
373
 
+++ innodb_plugin-1.0.6_tmp/handler/ha_innodb.cc        2009-12-04 14:13:57.000000000 +0900
374
 
@@ -1368,6 +1368,16 @@
 
372
--- innodb_plugin-1.0.6_orig/handler/ha_innodb.cc       2009-12-10 17:47:15.000000000 +0900
 
373
+++ innodb_plugin-1.0.6_tmp/handler/ha_innodb.cc        2009-12-10 17:48:12.000000000 +0900
 
374
@@ -1369,6 +1369,16 @@
375
375
        trx->check_unique_secondary = !thd_test_options(
376
376
                thd, OPTION_RELAXED_UNIQUE_CHECKS);
377
377
 
388
388
        DBUG_VOID_RETURN;
389
389
 }
390
390
 
391
 
@@ -1424,6 +1434,32 @@
 
391
@@ -1425,6 +1435,32 @@
392
392
 }
393
393
 
394
394
 
421
421
 /*********************************************************************//**
422
422
 Construct ha_innobase handler. */
423
423
 UNIV_INTERN
424
 
@@ -8269,6 +8305,23 @@
 
424
@@ -8271,6 +8307,23 @@
425
425
        statement has ended */
426
426
 
427
427
        if (trx->n_mysql_tables_in_use == 0) {
446
446
                trx->mysql_n_tables_locked = 0;
447
447
                prebuilt->used_in_HANDLER = FALSE;
448
448
diff -ruN innodb_plugin-1.0.6_orig/handler/innodb_patch_info.h innodb_plugin-1.0.6_tmp/handler/innodb_patch_info.h
449
 
--- innodb_plugin-1.0.6_orig/handler/innodb_patch_info.h        2009-12-04 14:13:06.000000000 +0900
450
 
+++ innodb_plugin-1.0.6_tmp/handler/innodb_patch_info.h 2009-12-04 14:13:57.000000000 +0900
 
449
--- innodb_plugin-1.0.6_orig/handler/innodb_patch_info.h        2009-12-10 17:47:15.000000000 +0900
 
450
+++ innodb_plugin-1.0.6_tmp/handler/innodb_patch_info.h 2009-12-10 17:48:12.000000000 +0900
451
451
@@ -40,5 +40,6 @@
452
452
 {"innodb_purge_thread","Enable to use purge devoted thread","","http://www.percona.com/docs/wiki/percona-xtradb"},
453
453
 {"innodb_admin_command_base","XtraDB specific command interface through i_s","","http://www.percona.com/docs/wiki/percona-xtradb"},
457
457
 };
458
458
diff -ruN innodb_plugin-1.0.6_orig/include/buf0rea.h innodb_plugin-1.0.6_tmp/include/buf0rea.h
459
459
--- innodb_plugin-1.0.6_orig/include/buf0rea.h  2009-08-28 01:20:35.000000000 +0900
460
 
+++ innodb_plugin-1.0.6_tmp/include/buf0rea.h   2009-12-04 14:13:57.000000000 +0900
 
460
+++ innodb_plugin-1.0.6_tmp/include/buf0rea.h   2009-12-10 17:48:12.000000000 +0900
461
461
@@ -27,6 +27,7 @@
462
462
 #define buf0rea_h
463
463
 
488
488
 Issues read requests for pages which the ibuf module wants to read in, in
489
489
 order to contract the insert buffer tree. Technically, this function is like
490
490
diff -ruN innodb_plugin-1.0.6_orig/include/fil0fil.h innodb_plugin-1.0.6_tmp/include/fil0fil.h
491
 
--- innodb_plugin-1.0.6_orig/include/fil0fil.h  2009-12-04 10:44:42.000000000 +0900
492
 
+++ innodb_plugin-1.0.6_tmp/include/fil0fil.h   2009-12-04 14:13:57.000000000 +0900
 
491
--- innodb_plugin-1.0.6_orig/include/fil0fil.h  2009-12-10 17:17:01.000000000 +0900
 
492
+++ innodb_plugin-1.0.6_tmp/include/fil0fil.h   2009-12-10 17:48:12.000000000 +0900
493
493
@@ -611,9 +611,12 @@
494
494
 Reads or writes data. This operation is asynchronous (aio).
495
495
 @return DB_SUCCESS, or DB_TABLESPACE_DELETED if we are trying to do
517
517
 handler for completed requests. The aio array of pending requests is divided
518
518
diff -ruN innodb_plugin-1.0.6_orig/include/os0file.h innodb_plugin-1.0.6_tmp/include/os0file.h
519
519
--- innodb_plugin-1.0.6_orig/include/os0file.h  2009-11-11 22:33:49.000000000 +0900
520
 
+++ innodb_plugin-1.0.6_tmp/include/os0file.h   2009-12-04 14:13:57.000000000 +0900
 
520
+++ innodb_plugin-1.0.6_tmp/include/os0file.h   2009-12-10 17:48:12.000000000 +0900
521
521
@@ -53,6 +53,7 @@
522
522
 #define os0file_h
523
523
 
564
564
 Wakes up all async i/o threads so that they know to exit themselves in
565
565
 shutdown. */
566
566
diff -ruN innodb_plugin-1.0.6_orig/include/srv0srv.h innodb_plugin-1.0.6_tmp/include/srv0srv.h
567
 
--- innodb_plugin-1.0.6_orig/include/srv0srv.h  2009-12-04 14:03:58.000000000 +0900
568
 
+++ innodb_plugin-1.0.6_tmp/include/srv0srv.h   2009-12-04 14:13:57.000000000 +0900
 
567
--- innodb_plugin-1.0.6_orig/include/srv0srv.h  2009-12-10 17:37:06.000000000 +0900
 
568
+++ innodb_plugin-1.0.6_tmp/include/srv0srv.h   2009-12-10 17:48:12.000000000 +0900
569
569
@@ -80,6 +80,9 @@
570
570
 #define SRV_AUTO_EXTEND_INCREMENT      \
571
571
        (srv_auto_extend_increment * ((1024 * 1024) / UNIV_PAGE_SIZE))
577
577
 extern ibool   srv_lower_case_table_names;
578
578
 
579
579
diff -ruN innodb_plugin-1.0.6_orig/include/trx0trx.h innodb_plugin-1.0.6_tmp/include/trx0trx.h
580
 
--- innodb_plugin-1.0.6_orig/include/trx0trx.h  2009-12-04 12:00:29.000000000 +0900
581
 
+++ innodb_plugin-1.0.6_tmp/include/trx0trx.h   2009-12-04 14:13:57.000000000 +0900
 
580
--- innodb_plugin-1.0.6_orig/include/trx0trx.h  2009-12-10 17:17:01.000000000 +0900
 
581
+++ innodb_plugin-1.0.6_tmp/include/trx0trx.h   2009-12-10 17:48:12.000000000 +0900
582
582
@@ -729,6 +729,17 @@
583
583
        /*------------------------------*/
584
584
        char detailed_error[256];       /*!< detailed error message for last
598
598
 
599
599
 #define TRX_MAX_N_THREADS      32      /* maximum number of
600
600
diff -ruN innodb_plugin-1.0.6_orig/lock/lock0lock.c innodb_plugin-1.0.6_tmp/lock/lock0lock.c
601
 
--- innodb_plugin-1.0.6_orig/lock/lock0lock.c   2009-12-04 10:44:43.000000000 +0900
602
 
+++ innodb_plugin-1.0.6_tmp/lock/lock0lock.c    2009-12-04 14:13:57.000000000 +0900
 
601
--- innodb_plugin-1.0.6_orig/lock/lock0lock.c   2009-12-10 17:17:01.000000000 +0900
 
602
+++ innodb_plugin-1.0.6_tmp/lock/lock0lock.c    2009-12-10 17:48:12.000000000 +0900
603
603
@@ -1755,6 +1755,8 @@
604
604
 {
605
605
        lock_t* lock;
641
641
        trx->was_chosen_as_deadlock_victim = FALSE;
642
642
        trx->wait_started = time(NULL);
643
643
diff -ruN innodb_plugin-1.0.6_orig/os/os0file.c innodb_plugin-1.0.6_tmp/os/os0file.c
644
 
--- innodb_plugin-1.0.6_orig/os/os0file.c       2009-12-04 10:48:12.000000000 +0900
645
 
+++ innodb_plugin-1.0.6_tmp/os/os0file.c        2009-12-04 14:13:57.000000000 +0900
 
644
--- innodb_plugin-1.0.6_orig/os/os0file.c       2009-12-10 17:27:16.000000000 +0900
 
645
+++ innodb_plugin-1.0.6_tmp/os/os0file.c        2009-12-10 17:49:17.000000000 +0900
646
646
@@ -55,6 +55,8 @@
647
647
 #include "srv0start.h"
648
648
 #include "fil0fil.h"
649
649
 #include "buf0buf.h"
650
650
+#include "trx0sys.h"
651
651
+#include "trx0trx.h"
 
652
 #include "log0recv.h"
652
653
 #ifndef UNIV_HOTBACKUP
653
654
 # include "os0sync.h"
654
 
 # include "os0thread.h"
655
 
@@ -2099,22 +2101,30 @@
 
655
@@ -2100,22 +2102,30 @@
656
656
 /*******************************************************************//**
657
657
 Does a synchronous read operation in Posix.
658
658
 @return        number of bytes read, -1 if error */
685
685
 
686
686
        ut_a((offset & 0xFFFFFFFFUL) == offset);
687
687
 
688
 
@@ -2135,6 +2145,15 @@
 
688
@@ -2136,6 +2146,15 @@
689
689
 
690
690
        os_n_file_reads++;
691
691
 
701
701
 #if defined(HAVE_PREAD) && !defined(HAVE_BROKEN_PREAD)
702
702
        os_mutex_enter(os_file_count_mutex);
703
703
        os_file_n_pending_preads++;
704
 
@@ -2148,6 +2167,13 @@
 
704
@@ -2149,6 +2168,13 @@
705
705
        os_n_pending_reads--;
706
706
        os_mutex_exit(os_file_count_mutex);
707
707
 
715
715
        return(n_bytes);
716
716
 #else
717
717
        {
718
 
@@ -2184,6 +2210,13 @@
 
718
@@ -2185,6 +2211,13 @@
719
719
                os_n_pending_reads--;
720
720
                os_mutex_exit(os_file_count_mutex);
721
721
 
729
729
                return(ret);
730
730
        }
731
731
 #endif
732
 
@@ -2314,7 +2347,7 @@
 
732
@@ -2315,7 +2348,7 @@
733
733
 @return        TRUE if request was successful, FALSE if fail */
734
734
 UNIV_INTERN
735
735
 ibool
738
738
 /*=========*/
739
739
        os_file_t       file,   /*!< in: handle to a file */
740
740
        void*           buf,    /*!< in: buffer where to read */
741
 
@@ -2322,7 +2355,8 @@
 
741
@@ -2323,7 +2356,8 @@
742
742
                                offset where to read */
743
743
        ulint           offset_high, /*!< in: most significant 32 bits of
744
744
                                offset */
748
748
 {
749
749
 #ifdef __WIN__
750
750
        BOOL            ret;
751
 
@@ -2394,7 +2428,7 @@
 
751
@@ -2395,7 +2429,7 @@
752
752
        os_bytes_read_since_printout += n;
753
753
 
754
754
 try_again:
757
757
 
758
758
        if ((ulint)ret == n) {
759
759
 
760
 
@@ -3359,7 +3393,8 @@
 
760
@@ -3360,7 +3394,8 @@
761
761
                                offset */
762
762
        ulint           offset_high, /*!< in: most significant 32 bits of
763
763
                                offset */
767
767
 {
768
768
        os_aio_slot_t*  slot;
769
769
 #ifdef WIN_ASYNC_IO
770
 
@@ -3643,10 +3678,11 @@
 
770
@@ -3644,10 +3679,11 @@
771
771
                                (can be used to identify a completed
772
772
                                aio operation); ignored if mode is
773
773
                                OS_AIO_SYNC */
780
780
 {
781
781
        os_aio_array_t* array;
782
782
        os_aio_slot_t*  slot;
783
 
@@ -3685,8 +3721,8 @@
 
783
@@ -3686,8 +3722,8 @@
784
784
                wait in the Windows case. */
785
785
 
786
786
                if (type == OS_FILE_READ) {
791
791
                }
792
792
 
793
793
                ut_a(type == OS_FILE_WRITE);
794
 
@@ -3719,8 +3755,13 @@
 
794
@@ -3720,8 +3756,13 @@
795
795
                ut_error;
796
796
        }
797
797
 
807
807
                if (os_aio_use_native_aio) {
808
808
 #ifdef WIN_ASYNC_IO
809
809
diff -ruN innodb_plugin-1.0.6_orig/srv/srv0srv.c innodb_plugin-1.0.6_tmp/srv/srv0srv.c
810
 
--- innodb_plugin-1.0.6_orig/srv/srv0srv.c      2009-12-04 14:03:58.000000000 +0900
811
 
+++ innodb_plugin-1.0.6_tmp/srv/srv0srv.c       2009-12-04 14:13:57.000000000 +0900
 
810
--- innodb_plugin-1.0.6_orig/srv/srv0srv.c      2009-12-10 17:37:06.000000000 +0900
 
811
+++ innodb_plugin-1.0.6_tmp/srv/srv0srv.c       2009-12-10 17:48:12.000000000 +0900
812
812
@@ -104,6 +104,9 @@
813
813
 #include "trx0i_s.h"
814
814
 #include "os0sync.h" /* for HAVE_ATOMIC_BUILTINS */
819
819
 /* This is set to TRUE if the MySQL user has set it in MySQL; currently
820
820
 affects only FOREIGN KEY definition parsing */
821
821
 UNIV_INTERN ibool      srv_lower_case_table_names      = FALSE;
822
 
@@ -1162,6 +1165,10 @@
 
822
@@ -1163,6 +1166,10 @@
823
823
        ibool                   has_slept = FALSE;
824
824
        srv_conc_slot_t*        slot      = NULL;
825
825
        ulint                   i;
830
830
 
831
831
        if (trx->mysql_thd != NULL
832
832
            && thd_is_replication_slave_thread(trx->mysql_thd)) {
833
 
@@ -1238,6 +1245,7 @@
 
833
@@ -1239,6 +1246,7 @@
834
834
                switches. */
835
835
                if (SRV_THREAD_SLEEP_DELAY > 0) {
836
836
                        os_thread_sleep(SRV_THREAD_SLEEP_DELAY);
838
838
                }
839
839
 
840
840
                trx->op_info = "";
841
 
@@ -1293,12 +1301,25 @@
 
841
@@ -1294,12 +1302,25 @@
842
842
        /* Go to wait for the event; when a thread leaves InnoDB it will
843
843
        release this thread */
844
844
 
865
865
 
866
866
        srv_conc_n_waiting_threads--;
867
867
diff -ruN innodb_plugin-1.0.6_orig/trx/trx0trx.c innodb_plugin-1.0.6_tmp/trx/trx0trx.c
868
 
--- innodb_plugin-1.0.6_orig/trx/trx0trx.c      2009-12-04 12:00:29.000000000 +0900
869
 
+++ innodb_plugin-1.0.6_tmp/trx/trx0trx.c       2009-12-04 14:13:57.000000000 +0900
 
868
--- innodb_plugin-1.0.6_orig/trx/trx0trx.c      2009-12-10 17:17:01.000000000 +0900
 
869
+++ innodb_plugin-1.0.6_tmp/trx/trx0trx.c       2009-12-10 17:48:12.000000000 +0900
870
870
@@ -178,6 +178,15 @@
871
871
        trx->global_read_view = NULL;
872
872
        trx->read_view = NULL;