summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorunknown <heikki@donna.mysql.fi>2001-05-23 18:04:49 +0300
committerunknown <heikki@donna.mysql.fi>2001-05-23 18:04:49 +0300
commit2f8dfb3f4a13e8cd205e490722fb298712257ebf (patch)
treec1ad23c161d316af10c275cad5f8b15f58e28c86 /innobase
parent41dd2aa2b5a2f8b7a5d760bff26e8ceb2ce10fff (diff)
downloadmariadb-git-2f8dfb3f4a13e8cd205e490722fb298712257ebf.tar.gz
srv0srv.h One can now specify innodb_unix_file_flush_method in my.cnf
srv0srv.c One can now specify innodb_unix_file_flush_method in my.cnf srv0start.c One can now specify innodb_unix_file_flush_method in my.cnf ha_innobase.cc One can now specify innodb_unix_file_flush_method in my.cnf ha_innobase.h One can now specify innodb_unix_file_flush_method in my.cnf mysqld.cc One can now specify innodb_unix_file_flush_method in my.cnf sql/ha_innobase.cc: One can now specify innodb_unix_file_flush_method in my.cnf sql/ha_innobase.h: One can now specify innodb_unix_file_flush_method in my.cnf sql/mysqld.cc: One can now specify innodb_unix_file_flush_method in my.cnf innobase/srv/srv0srv.c: One can now specify innodb_unix_file_flush_method in my.cnf innobase/srv/srv0start.c: One can now specify innodb_unix_file_flush_method in my.cnf innobase/include/srv0srv.h: One can now specify innodb_unix_file_flush_method in my.cnf BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'innobase')
-rw-r--r--innobase/include/srv0srv.h10
-rw-r--r--innobase/srv/srv0srv.c3
-rw-r--r--innobase/srv/srv0start.c18
3 files changed, 31 insertions, 0 deletions
diff --git a/innobase/include/srv0srv.h b/innobase/include/srv0srv.h
index 8853745926d..26164e2ccdc 100644
--- a/innobase/include/srv0srv.h
+++ b/innobase/include/srv0srv.h
@@ -48,6 +48,9 @@ extern dulint srv_archive_recovery_limit_lsn;
extern ulint srv_lock_wait_timeout;
+extern char* srv_unix_file_flush_method_str;
+extern ulint srv_unix_file_flush_method;
+
extern ibool srv_set_thread_priorities;
extern int srv_query_thread_priority;
@@ -100,6 +103,13 @@ typedef struct srv_sys_struct srv_sys_t;
/* The server system */
extern srv_sys_t* srv_sys;
+/* Alternatives for fiel flush option in Unix; see the InnoDB manual about
+what these mean */
+#define SRV_UNIX_FDATASYNC 1
+#define SRV_UNIX_O_DSYNC 2
+#define SRV_UNIX_LITTLESYNC 3
+#define SRV_UNIX_NOSYNC 4
+
/*************************************************************************
Boots Innobase server. */
diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c
index df36ec446a3..186ed1b8d56 100644
--- a/innobase/srv/srv0srv.c
+++ b/innobase/srv/srv0srv.c
@@ -88,6 +88,9 @@ dulint srv_archive_recovery_limit_lsn;
ulint srv_lock_wait_timeout = 1024 * 1024 * 1024;
+char* srv_unix_file_flush_method_str = NULL;
+ulint srv_unix_file_flush_method = 0;
+
ibool srv_set_thread_priorities = TRUE;
int srv_query_thread_priority = 0;
/*-------------------------------------------*/
diff --git a/innobase/srv/srv0start.c b/innobase/srv/srv0start.c
index 9e10cca7200..105d6e11623 100644
--- a/innobase/srv/srv0start.c
+++ b/innobase/srv/srv0start.c
@@ -532,6 +532,24 @@ innobase_start_or_create_for_mysql(void)
srv_is_being_started = TRUE;
+ if (0 == ut_strcmp(srv_unix_file_flush_method_str, "fdatasync")) {
+ srv_unix_file_flush_method = SRV_UNIX_FDATASYNC;
+ } else if (0 == ut_strcmp(srv_unix_file_flush_method_str, "O_DSYNC")) {
+ srv_unix_file_flush_method = SRV_UNIX_O_DSYNC;
+ } else if (0 == ut_strcmp(srv_unix_file_flush_method_str,
+ "littlesync")) {
+ srv_unix_file_flush_method = SRV_UNIX_LITTLESYNC;
+ } else if (0 == ut_strcmp(srv_unix_file_flush_method_str, "nosync")) {
+ srv_unix_file_flush_method = SRV_UNIX_NOSYNC;
+ } else {
+ fprintf(stderr,
+ "InnoDB: Unrecognized value for innodb_unix_file_flush_method\n");
+
+ return(DB_ERROR);
+ }
+
+ printf("InnoDB file flush method %lu\n", srv_unix_file_flush_method);
+
os_aio_use_native_aio = srv_use_native_aio;
err = srv_boot();