summaryrefslogtreecommitdiff
path: root/sql/ha_innodb.cc
diff options
context:
space:
mode:
authorunknown <gbichot@quadita2.mysql.com>2005-04-15 18:00:38 +0200
committerunknown <gbichot@quadita2.mysql.com>2005-04-15 18:00:38 +0200
commit43b1125cb9433c1ff1efce0d823f62de6b5a7dc9 (patch)
tree0cb2a277f0c3cbfc9d0767d8b8fd920ce539bf8d /sql/ha_innodb.cc
parente35244d626a14d2574efbee5c5db0dfec27cb8aa (diff)
downloadmariadb-git-43b1125cb9433c1ff1efce0d823f62de6b5a7dc9.tar.gz
Adding --innodb_fast_shutdown=2 which shuts down InnoDB faster than the default "1":
most InnoDB threads are not terminated properly and the buffer pool is not flushed to disk. Still no committed transaction is lost as we flush the logs to disk. InnoDB does crash recovery at startup after this shutdown. Using this shutdown in testsuite (mysql-test-run --mysqld=--innodb_fast_shutdown=2) saved 3 minutes (13% of total time). innobase/include/srv0srv.h: srv_fast_shutdown now int to allow 3 values, replacing the srv_fast_shutdown/srv_very_fast_shutdown combo innobase/log/log0log.c: srv_very_fast_shutdown -> (srv_fast_shutdown == 2) innobase/srv/srv0srv.c: srv_very_fast_shutdown -> (srv_fast_shutdown == 2) innobase/srv/srv0start.c: moving message to the InnoDB internal code (like "InnoDB: Starting shutdown" is) instead of ha_innodb.cc. That's to have ut_print_timestamp(). sql/ha_innodb.cc: As innodb_fast_shutdown is now settable, srv_fast_shutdown must be set at shutdown, not at startup. sql/ha_innodb.h: innobase_fast_shutdown now ulong to accept 3 values sql/mysqld.cc: Making the "very fast" InnoDB shutdown accessible to users, by passing --innodb-fast-shutdown=2 (disabled on Netware) sql/set_var.cc: innodb_fast_shutdown now settable on the fly (global variable). So that user can decide to do a normal/fast/fastest shutdown just before doing it.
Diffstat (limited to 'sql/ha_innodb.cc')
-rw-r--r--sql/ha_innodb.cc19
1 files changed, 2 insertions, 17 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index 4f640242297..a26c706bb08 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -116,15 +116,12 @@ char* innobase_unix_file_flush_method = NULL;
values */
uint innobase_flush_log_at_trx_commit = 1;
+ulong innobase_fast_shutdown = 1;
my_bool innobase_log_archive = FALSE;/* unused */
my_bool innobase_use_doublewrite = TRUE;
my_bool innobase_use_checksums = TRUE;
my_bool innobase_use_large_pages = FALSE;
my_bool innobase_use_native_aio = FALSE;
-my_bool innobase_fast_shutdown = TRUE;
-my_bool innobase_very_fast_shutdown = FALSE; /* this can be set to
- 1 just prior calling
- innobase_end() */
my_bool innobase_file_per_table = FALSE;
my_bool innobase_locks_unsafe_for_binlog = FALSE;
my_bool innobase_create_status_file = FALSE;
@@ -1238,8 +1235,6 @@ innobase_init(void)
srv_lock_wait_timeout = (ulint) innobase_lock_wait_timeout;
srv_force_recovery = (ulint) innobase_force_recovery;
- srv_fast_shutdown = (ibool) innobase_fast_shutdown;
-
srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite;
srv_use_checksums = (ibool) innobase_use_checksums;
@@ -1330,17 +1325,7 @@ innobase_end(void)
#endif
if (innodb_inited) {
-#ifndef __NETWARE__ /* NetWare can't close unclosed files, kill remaining
- threads, etc, so we disable the very fast shutdown */
- if (innobase_very_fast_shutdown) {
- srv_very_fast_shutdown = TRUE;
- fprintf(stderr,
-"InnoDB: MySQL has requested a very fast shutdown without flushing\n"
-"InnoDB: the InnoDB buffer pool to data files. At the next mysqld startup\n"
-"InnoDB: InnoDB will do a crash recovery!\n");
- }
-#endif
-
+ srv_fast_shutdown = (ulint) innobase_fast_shutdown;
innodb_inited = 0;
if (innobase_shutdown_for_mysql() != DB_SUCCESS) {
err = 1;