Make InnoDB doublewrite buffer creation more robust.
buf_dblwr_create(): Remove a bogus check for the buffer pool size. Theoretically, there is no problem if the doublewrite buffer is larger than the buffer pool. It could only cause trouble on crash recovery, and on recovery the doublewrite buffer is read to a buffer that is allocated outside of the buffer pool. Moreover, this check was only performed when the database was initialized for the first time. On a normal startup, buf_dblwr_init() would not enforce any rule on the innodb_buffer_pool_size. Furthermore, in case of an error, commit the mini-transaction in order to avoid an assertion failure on shutdown. Yes, this will leave the doublewrite buffer in a corrupted stage, but the doublewrite buffer should only be initialized when the data files are being initialized from the scratch in the first place.
Showing
Please register or sign in to comment