maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #04747
Re: [Commits] Rev 3429: MDEV-329: MariaDB 5.5 does not use fdatasync(). in http://bazaar.launchpad.net/~maria-captains/maria/5.5
Hi wlad,
Can I get you to review the following one-liner? (Just the Cmake part).
The problem is that the code in 5.5 currently does not use fdatasync(),
falling back to fsync(). The fdatasync() is detected correctly by cmake, but
the HAVE_DECL_FDATASYNC symbol does not get defined so code does not use it.
Is adding HAVE_DECL_FDATASYNC to config.h.cmake the correct fix?
- Kristian.
knielsen@xxxxxxxxxxxxxxx writes:
> At http://bazaar.launchpad.net/~maria-captains/maria/5.5
>
> ------------------------------------------------------------
> revno: 3429
> revision-id: knielsen@xxxxxxxxxxxxxxx-20120608091856-jmxb22ehrdp8xjdo
> parent: timour@xxxxxxxxxxxx-20120606131948-0k4ih4get2fttge0
> committer: knielsen@xxxxxxxxxxxxxxx
> branch nick: mariadb-5.5
> timestamp: Fri 2012-06-08 11:18:56 +0200
> message:
> MDEV-329: MariaDB 5.5 does not use fdatasync().
>
> The --debug-no-sync incorrectly defaulted to ON, disabling sync calls
> by default which can loose data or cause corruption. Also, the code
> used fsync() instead of the sometimes more efficient fdatasync().
> === modified file 'config.h.cmake'
> --- a/config.h.cmake 2012-04-19 02:02:28 +0000
> +++ b/config.h.cmake 2012-06-08 09:18:56 +0000
> @@ -150,6 +150,7 @@
> #cmakedefine HAVE_FCNTL 1
> #cmakedefine HAVE_FCONVERT 1
> #cmakedefine HAVE_FDATASYNC 1
> +#cmakedefine HAVE_DECL_FDATASYNC 1
> #cmakedefine HAVE_FESETROUND 1
> #cmakedefine HAVE_FINITE 1
> #cmakedefine HAVE_FP_EXCEPT 1
>
> === modified file 'sql/mysqld.cc'
> --- a/sql/mysqld.cc 2012-05-21 18:54:41 +0000
> +++ b/sql/mysqld.cc 2012-06-08 09:18:56 +0000
> @@ -6161,7 +6161,7 @@ struct my_option my_long_options[]=
> #endif
> {"debug-no-sync", 0,
> "Disables system sync calls. Only for running tests or debugging!",
> - &my_disable_sync, &my_disable_sync, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
> + &my_disable_sync, &my_disable_sync, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
> #ifdef HAVE_REPLICATION
> {"debug-sporadic-binlog-dump-fail", 0,
> "Option used by mysql-test for debugging and testing of replication.",
>
> _______________________________________________
> commits mailing list
> commits@xxxxxxxxxxx
> https://lists.askmonty.org/cgi-bin/mailman/listinfo/commits
Follow ups