Get the App
SLTechnology News&Howtos  ›  Database  › 

What is the function of innodb_fast_shutdown parameter in mysql

Shulou Source: shulou.com Published: 2022-05-31 14:53:51 10月24日 Update

This article mainly explains "what is the role of innodb_fast_shutdown parameters in mysql". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the role of innodb_fast_shutdown parameters in mysql".

When mysql is turned off, the parameter innodb_fast_shutdown affects the behavior that the storage engine of the table is innodb. The parameter is 0, 1, 2, and 3 values.

0, which means that when MYSQL shuts down, Innodb needs to complete all full purge and merge insert buffer operations, which takes time to complete. If you do an Innodb plugin upgrade, you usually need to set this parameter to 0, and then shut down the database

1, which is the default value of the parameter, there is no need to complete full purge and merge insert buffer operations, but some dirty pages in the buffer pool will still be flushed to disk.

2 means that full purge and merge insert buffer operations do not need to be completed, and dirty pages of data in the buffer pool are not written back to disk. Instead, the logs are written to the log file. Nothing will be lost this way, but mysql will perform a restore operation (recovery) the next time it starts

If it was in the case of innodb_fast_shutdown=2 or mysql crash the last time innodb was closed, it uses redo log to redo transactions that have already been committed.

The next operation process is:

(1)。 Rollback uncompleted transitions cancels transactions that are not committed

(2)。 Purge all clears useless undo pages

(3)。 Merge insert buffer merge insert buffer

Thank you for your reading, the above is the content of "what is the role of innodb_fast_shutdown parameters in mysql". After the study of this article, I believe you have a deeper understanding of the role of innodb_fast_shutdown parameters in mysql, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Parameters functions data learning buffering transactions content situation logs are on disk next three representatives that is engines ideas databases files articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Apple Shulou Tech Info Huawei Docker