innodb_fast_shutdown影响着innodb表的行为,该参数可设置为0,1,2
0 表示当MySQL关闭时,InnoDB需要完成所有的full purge和merge insert buffer操作。耗时比较长。
1 是默认值。表示不需要完成full purge和merge insert buffer操作,但是在缓冲池中的一些数据脏页会刷新到磁盘。
2 表示不完成full purge和merge insert buffer操作,也不将缓冲池中的数据脏页写回到磁盘,而是将日志写入到日志文件。MySQL下次启动时,会执行恢复操作。
关闭过程:
110421 10:47:45  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!
110421 10:47:45  InnoDB: Starting shutdown...
110421 10:47:45 [Note] /usr/local/mysql-5.5.11/bin/mysqld: Shutdown complete
启动过程:
110421 10:58:17 InnoDB: The InnoDB memory heap is disabled
110421 10:58:17 InnoDB: Mutexes and rw_locks use GCC atomic builtins
110421 10:58:17 InnoDB: Compressed tables use zlib 1.2.3
110421 10:58:17 InnoDB: Initializing buffer pool, size = 2.0G
110421 10:58:18 InnoDB: Completed initialization of buffer pool
110421 10:58:18 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 30282819098
110421 10:58:18  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 30284167011
110421 10:58:18  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
InnoDB: Last MySQL binlog file position 0 21505585, file name ./mysql-bin.000048
110421 10:58:19  InnoDB: Waiting for the background threads to start
110421 10:58:20 InnoDB: 1.1.6 started; log sequence number 30284167011