~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/include/log0log.h

  • Committer: Brian Aker
  • Date: 2010-10-28 17:12:01 UTC
  • mfrom: (1887.1.3 merge)
  • Revision ID: brian@tangent.org-20101028171201-baj6l1bnntn1s4ad
Merge in POTFILES changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (C) 1995, 2010, Innobase Oy. All Rights Reserved.
4
 
Copyright (C) 2009 Google Inc.
 
3
Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved.
 
4
 
 
5
This program is free software; you can redistribute it and/or modify it under
 
6
the terms of the GNU General Public License as published by the Free Software
 
7
Foundation; version 2 of the License.
 
8
 
 
9
This program is distributed in the hope that it will be useful, but WITHOUT
 
10
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
11
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 
12
 
 
13
You should have received a copy of the GNU General Public License along with
 
14
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
 
15
St, Fifth Floor, Boston, MA 02110-1301 USA
 
16
 
 
17
*****************************************************************************/
 
18
/*****************************************************************************
 
19
 
 
20
Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved.
 
21
Copyright (c) 2009, Google Inc.
5
22
 
6
23
Portions of this file contain modifications contributed and copyrighted by
7
24
Google, Inc. Those modifications are gratefully acknowledged and are described
763
780
#ifndef UNIV_HOTBACKUP
764
781
        mutex_t         mutex;          /*!< mutex protecting the log */
765
782
#endif /* !UNIV_HOTBACKUP */
766
 
 
767
 
        mutex_t         log_flush_order_mutex;/*!< mutex to serialize access to
768
 
                                        the flush list when we are putting
769
 
                                        dirty blocks in the list. The idea
770
 
                                        behind this mutex is to be able
771
 
                                        to release log_sys->mutex during
772
 
                                        mtr_commit and still ensure that
773
 
                                        insertions in the flush_list happen
774
 
                                        in the LSN order. */
775
783
        byte*           buf_ptr;        /* unaligned log buffer */
776
784
        byte*           buf;            /*!< log buffer */
777
785
        ulint           buf_size;       /*!< log buffer size in bytes */
817
825
                                        written to some log group; for this to
818
826
                                        be advanced, it is enough that the
819
827
                                        write i/o has been completed for all
820
 
                                        log groups.
821
 
                                        Note that since InnoDB currently
822
 
                                        has only one log group therefore
823
 
                                        this value is redundant. Also it
824
 
                                        is possible that this value
825
 
                                        falls behind the
826
 
                                        flushed_to_disk_lsn transiently.
827
 
                                        It is appropriate to use either
828
 
                                        flushed_to_disk_lsn or
829
 
                                        write_lsn which are always
830
 
                                        up-to-date and accurate. */
 
828
                                        log groups */
831
829
        ib_uint64_t     write_lsn;      /*!< end lsn for the current running
832
830
                                        write */
833
831
        ulint           write_end_offset;/*!< the data in buffer has
961
959
#endif /* UNIV_LOG_ARCHIVE */
962
960
};
963
961
 
964
 
/** Test if flush order mutex is owned. */
965
 
#define log_flush_order_mutex_own()     \
966
 
        mutex_own(&log_sys->log_flush_order_mutex)
967
 
 
968
 
/** Acquire the flush order mutex. */
969
 
#define log_flush_order_mutex_enter() do {              \
970
 
        mutex_enter(&log_sys->log_flush_order_mutex);   \
971
 
} while (0)
972
 
/** Release the flush order mutex. */
973
 
# define log_flush_order_mutex_exit() do {              \
974
 
        mutex_exit(&log_sys->log_flush_order_mutex);    \
975
 
} while (0)
976
 
 
977
962
#ifdef UNIV_LOG_ARCHIVE
978
963
/** Archiving state @{ */
979
964
#define LOG_ARCH_ON             71