~ubuntu-branches/ubuntu/precise/mysql-5.5/precise-201203300109

« back to all changes in this revision

Viewing changes to storage/innobase/fil/fil0fil.c

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-02-14 23:59:22 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20120214235922-cux5uek1e5l0hje9
Tags: 5.5.20-0ubuntu1
* New upstream release.
* d/mysql-server-5.5.mysql.upstart: Fix stop on to make sure mysql is
  fully stopped before shutdown commences. (LP: #688541) Also simplify
  start on as it is redundant.
* d/control: Depend on upstart version which has apparmor profile load
  script to prevent failure on upgrade from lucid to precise.
  (LP: #907465)
* d/apparmor-profile: need to allow /run since that is the true path
  of /var/run files. (LP: #917542)
* d/control: mysql-server-5.5 has files in it that used to be owned
  by libmysqlclient-dev, so it must break/replace it. (LP: #912487)
* d/rules, d/control: 5.5.20 Fixes segfault on tests with gcc 4.6,
  change compiler back to system default.
* d/rules: Turn off embedded libedit/readline.(Closes: #659566)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1803
1803
}
1804
1804
 
1805
1805
/*******************************************************************//**
1806
 
Reads the flushed lsn and arch no fields from a data file at database
1807
 
startup. */
 
1806
Reads the flushed lsn, arch no, and tablespace flag fields from a data
 
1807
file at database startup. */
1808
1808
UNIV_INTERN
1809
1809
void
1810
 
fil_read_flushed_lsn_and_arch_log_no(
1811
 
/*=================================*/
 
1810
fil_read_first_page(
 
1811
/*================*/
1812
1812
        os_file_t       data_file,              /*!< in: open data file */
1813
1813
        ibool           one_read_already,       /*!< in: TRUE if min and max
1814
1814
                                                parameters below already
1815
1815
                                                contain sensible data */
 
1816
        ulint*          flags,                  /*!< out: tablespace flags */
1816
1817
#ifdef UNIV_LOG_ARCHIVE
1817
 
        ulint*          min_arch_log_no,        /*!< in/out: */
1818
 
        ulint*          max_arch_log_no,        /*!< in/out: */
 
1818
        ulint*          min_arch_log_no,        /*!< out: min of archived
 
1819
                                                log numbers in data files */
 
1820
        ulint*          max_arch_log_no,        /*!< out: max of archived
 
1821
                                                log numbers in data files */
1819
1822
#endif /* UNIV_LOG_ARCHIVE */
1820
 
        ib_uint64_t*    min_flushed_lsn,        /*!< in/out: */
1821
 
        ib_uint64_t*    max_flushed_lsn)        /*!< in/out: */
 
1823
        ib_uint64_t*    min_flushed_lsn,        /*!< out: min of flushed
 
1824
                                                lsn values in data files */
 
1825
        ib_uint64_t*    max_flushed_lsn)        /*!< out: max of flushed
 
1826
                                                lsn values in data files */
1822
1827
{
1823
1828
        byte*           buf;
1824
 
        byte*           buf2;
 
1829
        page_t*         page;
1825
1830
        ib_uint64_t     flushed_lsn;
1826
1831
 
1827
 
        buf2 = ut_malloc(2 * UNIV_PAGE_SIZE);
 
1832
        buf = ut_malloc(2 * UNIV_PAGE_SIZE);
1828
1833
        /* Align the memory for a possible read from a raw device */
1829
 
        buf = ut_align(buf2, UNIV_PAGE_SIZE);
1830
 
 
1831
 
        os_file_read(data_file, buf, 0, 0, UNIV_PAGE_SIZE);
1832
 
 
1833
 
        flushed_lsn = mach_read_from_8(buf + FIL_PAGE_FILE_FLUSH_LSN);
1834
 
 
1835
 
        ut_free(buf2);
 
1834
        page = ut_align(buf, UNIV_PAGE_SIZE);
 
1835
 
 
1836
        os_file_read(data_file, page, 0, 0, UNIV_PAGE_SIZE);
 
1837
 
 
1838
        *flags = mach_read_from_4(page +
 
1839
                FSP_HEADER_OFFSET + FSP_SPACE_FLAGS);
 
1840
 
 
1841
        flushed_lsn = mach_read_from_8(page + FIL_PAGE_FILE_FLUSH_LSN);
 
1842
 
 
1843
        ut_free(buf);
1836
1844
 
1837
1845
        if (!one_read_already) {
1838
1846
                *min_flushed_lsn = flushed_lsn;