• unknown's avatar
    Adding --innodb_fast_shutdown=2 which shuts down InnoDB faster than the default "1": · 43b1125c
    unknown authored
    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.
    43b1125c
srv0srv.c 73.4 KB