~tsarev/percona-server/5.1.58

« back to all changes in this revision

Viewing changes to innodb_fix_misc.patch

  • Committer: kinoyasu
  • Date: 2011-07-07 02:03:23 UTC
  • mfrom: (226.9.1 5.1.57-tmp)
  • Revision ID: kinoyasu@gauntlet4-20110707020323-n0qc0cvqaxqbdlfd
mergeĀ 5.1.57-zip_table_import

Show diffs side-by-side

added added

removed removed

Lines of Context:
597
597
diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0fil.c
598
598
--- a/storage/innodb_plugin/fil/fil0fil.c       2011-02-21 20:31:57.838984412 +0900
599
599
+++ b/storage/innodb_plugin/fil/fil0fil.c       2011-02-21 20:32:39.528914782 +0900
600
 
@@ -242,6 +242,7 @@
 
600
@@ -244,6 +244,7 @@
601
601
 struct fil_system_struct {
602
602
 #ifndef UNIV_HOTBACKUP
603
603
        mutex_t         mutex;          /*!< The mutex protecting the cache */
605
605
 #endif /* !UNIV_HOTBACKUP */
606
606
        hash_table_t*   spaces;         /*!< The hash table of spaces in the
607
607
                                        system; they are hashed on the space
608
 
@@ -816,7 +817,7 @@
 
608
@@ -818,7 +819,7 @@
609
609
        ut_ad(node && system);
610
610
        ut_ad(mutex_own(&(system->mutex)));
611
611
        ut_a(node->open);
614
614
        ut_a(node->n_pending_flushes == 0);
615
615
        ut_a(node->modification_counter == node->flush_counter);
616
616
 
617
 
@@ -829,7 +830,7 @@
 
617
@@ -831,7 +832,7 @@
618
618
        ut_a(system->n_open > 0);
619
619
        system->n_open--;
620
620
 
623
623
                ut_a(UT_LIST_GET_LEN(system->LRU) > 0);
624
624
 
625
625
                /* The node is in the LRU list, remove it */
626
 
@@ -1028,7 +1029,7 @@
 
626
@@ -1030,7 +1031,7 @@
627
627
        ut_ad(node && system && space);
628
628
        ut_ad(mutex_own(&(system->mutex)));
629
629
        ut_a(node->magic_n == FIL_NODE_MAGIC_N);
632
632
 
633
633
        if (node->open) {
634
634
                /* We fool the assertion in fil_node_close_file() to think
635
 
@@ -1549,6 +1550,7 @@
 
635
@@ -1551,6 +1552,7 @@
636
636
        fil_system = mem_zalloc(sizeof(fil_system_t));
637
637
 
638
638
        mutex_create(&fil_system->mutex, SYNC_ANY_LATCH);
640
640
 
641
641
        fil_system->spaces = hash_create(hash_size);
642
642
        fil_system->name_hash = hash_create(hash_size);
643
 
@@ -2295,7 +2297,11 @@
 
643
@@ -2297,7 +2299,11 @@
644
644
        completely and permanently. The flag is_being_deleted also prevents
645
645
        fil_flush() from being applied to this tablespace. */
646
646
 
652
652
 #endif
653
653
        /* printf("Deleting tablespace %s id %lu\n", space->name, id); */
654
654
 
655
 
@@ -4350,6 +4356,10 @@
 
655
@@ -4671,6 +4677,10 @@
656
656
        ulint           page_size;
657
657
        ibool           success         = TRUE;
658
658
 
663
663
        fil_mutex_enter_and_prepare_for_io(space_id);
664
664
 
665
665
        space = fil_space_get_by_id(space_id);
666
 
@@ -4361,6 +4371,7 @@
 
666
@@ -4682,6 +4692,7 @@
667
667
                *actual_size = space->size;
668
668
 
669
669
                mutex_exit(&fil_system->mutex);
671
671
 
672
672
                return(TRUE);
673
673
        }
674
 
@@ -4393,6 +4404,8 @@
 
674
@@ -4714,6 +4725,8 @@
675
675
                offset_low  = ((start_page_no - file_start_page_no)
676
676
                               % (4096 * ((1024 * 1024) / page_size)))
677
677
                        * page_size;
680
680
 #ifdef UNIV_HOTBACKUP
681
681
                success = os_file_write(node->name, node->handle, buf,
682
682
                                        offset_low, offset_high,
683
 
@@ -4402,8 +4415,10 @@
 
683
@@ -4723,8 +4736,10 @@
684
684
                                 node->name, node->handle, buf,
685
685
                                 offset_low, offset_high,
686
686
                                 page_size * n_pages,
692
692
                if (success) {
693
693
                        node->size += n_pages;
694
694
                        space->size += n_pages;
695
 
@@ -4449,6 +4464,7 @@
 
695
@@ -4770,6 +4785,7 @@
696
696
        printf("Extended %s to %lu, actual size %lu pages\n", space->name,
697
697
        size_after_extend, *actual_size); */
698
698
        mutex_exit(&fil_system->mutex);
700
700
 
701
701
        fil_flush(space_id, TRUE);
702
702
 
703
 
@@ -4813,6 +4829,22 @@
 
703
@@ -5134,6 +5150,22 @@
704
704
                srv_data_written+= len;
705
705
        }
706
706
 
723
723
        /* Reserve the fil_system mutex and make sure that we can open at
724
724
        least one file while holding it, if the file is not already open */
725
725
 
726
 
@@ -4942,10 +4974,24 @@
 
726
@@ -5263,10 +5295,24 @@
727
727
 #else
728
728
        /* Queue the aio request */
729
729
        ret = os_aio(type, mode | wake_later, node->name, node->handle, buf,
749
749
        ut_a(ret);
750
750
 
751
751
        if (mode == OS_AIO_SYNC) {
752
 
@@ -5045,6 +5091,7 @@
 
752
@@ -5366,6 +5412,7 @@
753
753
        fil_node_t*     fil_node;
754
754
        void*           message;
755
755
        ulint           type;
757
757
 
758
758
        ut_ad(fil_validate());
759
759
 
760
 
@@ -5052,7 +5099,7 @@
 
760
@@ -5373,7 +5420,7 @@
761
761
                srv_set_io_thread_op_info(segment, "native aio handle");
762
762
 #ifdef WIN_ASYNC_IO
763
763
                ret = os_aio_windows_handle(segment, 0, &fil_node,
766
766
 #else
767
767
                ret = 0; /* Eliminate compiler warning */
768
768
                ut_error;
769
 
@@ -5061,7 +5108,22 @@
 
769
@@ -5382,7 +5429,22 @@
770
770
                srv_set_io_thread_op_info(segment, "simulated aio handle");
771
771
 
772
772
                ret = os_aio_simulated_handle(segment, &fil_node,