Loading innobase/include/srv0srv.h +6 −4 Original line number Diff line number Diff line Loading @@ -99,11 +99,13 @@ extern ulint srv_max_n_threads; extern lint srv_conc_n_threads; extern ibool srv_fast_shutdown; extern ibool srv_very_fast_shutdown; /* if this TRUE, do not flush the extern ulint srv_fast_shutdown; /* If this is 1, do not do a purge and index buffer merge. If this 2, do not even flush the buffer pool to data files at the shutdown; we effectively 'crash' InnoDB */ shutdown: we effectively 'crash' InnoDB (but lose no committed transactions). */ extern ibool srv_innodb_status; extern ibool srv_use_doublewrite_buf; Loading innobase/log/log0log.c +4 −6 Original line number Diff line number Diff line Loading @@ -3059,15 +3059,13 @@ logs_empty_and_mark_files_at_shutdown(void) goto loop; } if (srv_very_fast_shutdown) { /* In a 'very fast' shutdown we do not flush the buffer pool: if (srv_fast_shutdown == 2) { /* In this fastest shutdown we do not flush the buffer pool: it is essentially a 'crash' of the InnoDB server. Make sure that the log is all flushed to disk, so that we can recover all committed transactions in a crash recovery. In a 'very fast' shutdown we do not flush the buffer pool: it is essentially a 'crash' of the InnoDB server. Then we must not write the lsn stamps to the data files, since at a We must not write the lsn stamps to the data files, since at a startup InnoDB deduces from the stamps if the previous shutdown was clean. */ Loading innobase/srv/srv0srv.c +7 −10 Original line number Diff line number Diff line Loading @@ -300,15 +300,12 @@ SQL query after it has once got the ticket at srv_conc_enter_innodb */ #define SRV_FREE_TICKETS_TO_ENTER srv_n_free_tickets_to_enter #define SRV_THREAD_SLEEP_DELAY srv_thread_sleep_delay /*-----------------------*/ /* If the following is set TRUE then we do not run purge and insert buffer merge to completion before shutdown */ /* If the following is set to 1 then we do not run purge and insert buffer merge to completion before shutdown. If it is set to 2, do not even flush the buffer pool to data files at the shutdown: we effectively 'crash' InnoDB (but lose no committed transactions). */ ulint srv_fast_shutdown = 0; ibool srv_fast_shutdown = FALSE; ibool srv_very_fast_shutdown = FALSE; /* if this TRUE, do not flush the buffer pool to data files at the shutdown; we effectively 'crash' InnoDB */ /* Generate a innodb_status.<pid> file */ ibool srv_innodb_status = FALSE; Loading Loading @@ -2471,11 +2468,11 @@ srv_master_thread( flush_loop: srv_main_thread_op_info = "flushing buffer pool pages"; if (!srv_very_fast_shutdown) { if (srv_fast_shutdown < 2) { n_pages_flushed = buf_flush_batch(BUF_FLUSH_LIST, 100, ut_dulint_max); } else { /* In a 'very fast' shutdown we do not flush the buffer pool /* In the fastest shutdown we do not flush the buffer pool to data files: we set n_pages_flushed to 0 artificially. */ n_pages_flushed = 0; Loading innobase/srv/srv0start.c +9 −0 Original line number Diff line number Diff line Loading @@ -1729,6 +1729,15 @@ innobase_shutdown_for_mysql(void) The step 1 is the real InnoDB shutdown. The remaining steps 2 - ... just free data structures after the shutdown. */ if (srv_fast_shutdown == 2) { ut_print_timestamp(stderr); fprintf(stderr, " InnoDB: MySQL has requested a very fast shutdown without flushing " "the InnoDB buffer pool to data files. At the next mysqld startup " "InnoDB will do a crash recovery!\n"); } #ifdef __NETWARE__ if(!panic_shutdown) #endif Loading sql/ha_innodb.cc +2 −17 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; Loading Loading @@ -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; Loading Loading
innobase/include/srv0srv.h +6 −4 Original line number Diff line number Diff line Loading @@ -99,11 +99,13 @@ extern ulint srv_max_n_threads; extern lint srv_conc_n_threads; extern ibool srv_fast_shutdown; extern ibool srv_very_fast_shutdown; /* if this TRUE, do not flush the extern ulint srv_fast_shutdown; /* If this is 1, do not do a purge and index buffer merge. If this 2, do not even flush the buffer pool to data files at the shutdown; we effectively 'crash' InnoDB */ shutdown: we effectively 'crash' InnoDB (but lose no committed transactions). */ extern ibool srv_innodb_status; extern ibool srv_use_doublewrite_buf; Loading
innobase/log/log0log.c +4 −6 Original line number Diff line number Diff line Loading @@ -3059,15 +3059,13 @@ logs_empty_and_mark_files_at_shutdown(void) goto loop; } if (srv_very_fast_shutdown) { /* In a 'very fast' shutdown we do not flush the buffer pool: if (srv_fast_shutdown == 2) { /* In this fastest shutdown we do not flush the buffer pool: it is essentially a 'crash' of the InnoDB server. Make sure that the log is all flushed to disk, so that we can recover all committed transactions in a crash recovery. In a 'very fast' shutdown we do not flush the buffer pool: it is essentially a 'crash' of the InnoDB server. Then we must not write the lsn stamps to the data files, since at a We must not write the lsn stamps to the data files, since at a startup InnoDB deduces from the stamps if the previous shutdown was clean. */ Loading
innobase/srv/srv0srv.c +7 −10 Original line number Diff line number Diff line Loading @@ -300,15 +300,12 @@ SQL query after it has once got the ticket at srv_conc_enter_innodb */ #define SRV_FREE_TICKETS_TO_ENTER srv_n_free_tickets_to_enter #define SRV_THREAD_SLEEP_DELAY srv_thread_sleep_delay /*-----------------------*/ /* If the following is set TRUE then we do not run purge and insert buffer merge to completion before shutdown */ /* If the following is set to 1 then we do not run purge and insert buffer merge to completion before shutdown. If it is set to 2, do not even flush the buffer pool to data files at the shutdown: we effectively 'crash' InnoDB (but lose no committed transactions). */ ulint srv_fast_shutdown = 0; ibool srv_fast_shutdown = FALSE; ibool srv_very_fast_shutdown = FALSE; /* if this TRUE, do not flush the buffer pool to data files at the shutdown; we effectively 'crash' InnoDB */ /* Generate a innodb_status.<pid> file */ ibool srv_innodb_status = FALSE; Loading Loading @@ -2471,11 +2468,11 @@ srv_master_thread( flush_loop: srv_main_thread_op_info = "flushing buffer pool pages"; if (!srv_very_fast_shutdown) { if (srv_fast_shutdown < 2) { n_pages_flushed = buf_flush_batch(BUF_FLUSH_LIST, 100, ut_dulint_max); } else { /* In a 'very fast' shutdown we do not flush the buffer pool /* In the fastest shutdown we do not flush the buffer pool to data files: we set n_pages_flushed to 0 artificially. */ n_pages_flushed = 0; Loading
innobase/srv/srv0start.c +9 −0 Original line number Diff line number Diff line Loading @@ -1729,6 +1729,15 @@ innobase_shutdown_for_mysql(void) The step 1 is the real InnoDB shutdown. The remaining steps 2 - ... just free data structures after the shutdown. */ if (srv_fast_shutdown == 2) { ut_print_timestamp(stderr); fprintf(stderr, " InnoDB: MySQL has requested a very fast shutdown without flushing " "the InnoDB buffer pool to data files. At the next mysqld startup " "InnoDB will do a crash recovery!\n"); } #ifdef __NETWARE__ if(!panic_shutdown) #endif Loading
sql/ha_innodb.cc +2 −17 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; Loading Loading @@ -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; Loading