Commit 587df003 authored by heikki@donna.mysql.fi's avatar heikki@donna.mysql.fi
Browse files

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
parent 86eda127
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
jani@janikt.pp.saunalahti.fi
monty@tik.mysql.fi
monty@donna.mysql.fi
heikki@donna.mysql.fi
+10 −0
Original line number Diff line number Diff line
@@ -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. */

+3 −0
Original line number Diff line number Diff line
@@ -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;
/*-------------------------------------------*/
+18 −0
Original line number Diff line number Diff line
@@ -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();
+5 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ long innobase_mirrored_log_groups, innobase_log_files_in_group,

char *innobase_data_home_dir, *innobase_data_file_path;
char *innobase_log_group_home_dir, *innobase_log_arch_dir;
char *innobase_unix_file_flush_method;
bool innobase_flush_log_at_trx_commit, innobase_log_archive,
	innobase_use_native_aio;

@@ -474,6 +475,10 @@ innobase_init(void)
	  DBUG_RETURN(TRUE);
	}

	srv_unix_file_flush_method_str = (innobase_unix_file_flush_method ?
				      innobase_unix_file_flush_method :
				      (char*)"fdatasync");

	srv_n_log_groups = (ulint) innobase_mirrored_log_groups;
	srv_n_log_files = (ulint) innobase_log_files_in_group;
	srv_log_file_size = (ulint) innobase_log_file_size;
Loading