diff options
author | unknown <gbichot@quadita2.mysql.com> | 2005-04-15 18:00:38 +0200 |
---|---|---|
committer | unknown <gbichot@quadita2.mysql.com> | 2005-04-15 18:00:38 +0200 |
commit | 43b1125cb9433c1ff1efce0d823f62de6b5a7dc9 (patch) | |
tree | 0cb2a277f0c3cbfc9d0767d8b8fd920ce539bf8d /sql/set_var.cc | |
parent | e35244d626a14d2574efbee5c5db0dfec27cb8aa (diff) | |
download | mariadb-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/set_var.cc')
-rw-r--r-- | sql/set_var.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc index 3523e444216..fa8eddf7218 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -386,6 +386,8 @@ sys_var_thd_ulong sys_net_wait_timeout("wait_timeout", &SV::net_wait_timeout); #ifdef HAVE_INNOBASE_DB +sys_var_long_ptr sys_innodb_fast_shutdown("innodb_fast_shutdown", + &innobase_fast_shutdown); sys_var_long_ptr sys_innodb_max_dirty_pages_pct("innodb_max_dirty_pages_pct", &srv_max_buf_pool_modified_pct); sys_var_long_ptr sys_innodb_max_purge_lag("innodb_max_purge_lag", @@ -689,6 +691,7 @@ sys_var *sys_variables[]= &sys_tx_isolation, &sys_os, #ifdef HAVE_INNOBASE_DB + &sys_innodb_fast_shutdown, &sys_innodb_max_dirty_pages_pct, &sys_innodb_max_purge_lag, &sys_innodb_table_locks, @@ -795,7 +798,7 @@ struct show_var_st init_vars[]= { {"innodb_data_file_path", (char*) &innobase_data_file_path, SHOW_CHAR_PTR}, {"innodb_data_home_dir", (char*) &innobase_data_home_dir, SHOW_CHAR_PTR}, {"innodb_doublewrite", (char*) &innobase_use_doublewrite, SHOW_MY_BOOL}, - {"innodb_fast_shutdown", (char*) &innobase_fast_shutdown, SHOW_MY_BOOL}, + {sys_innodb_fast_shutdown.name,(char*) &sys_innodb_fast_shutdown, SHOW_SYS}, {"innodb_file_io_threads", (char*) &innobase_file_io_threads, SHOW_LONG }, {"innodb_file_per_table", (char*) &innobase_file_per_table, SHOW_MY_BOOL}, {"innodb_flush_log_at_trx_commit", (char*) &innobase_flush_log_at_trx_commit, SHOW_INT}, |