Commit 3fde5908 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Only synchronous disk reads should use thd_wait_begin with THD_WAIT_DISKIO

parent 02724621
...@@ -182,7 +182,10 @@ not_to_recover: ...@@ -182,7 +182,10 @@ not_to_recover:
ut_ad(buf_page_in_file(bpage)); ut_ad(buf_page_in_file(bpage));
thd_wait_begin(NULL, THD_WAIT_DISKIO); if(sync) {
thd_wait_begin(NULL, THD_WAIT_DISKIO);
}
if (zip_size) { if (zip_size) {
*err = _fil_io(OS_FILE_READ | wake_later, *err = _fil_io(OS_FILE_READ | wake_later,
sync, space, zip_size, offset, 0, zip_size, sync, space, zip_size, offset, 0, zip_size,
...@@ -194,7 +197,6 @@ not_to_recover: ...@@ -194,7 +197,6 @@ not_to_recover:
sync, space, 0, offset, 0, UNIV_PAGE_SIZE, sync, space, 0, offset, 0, UNIV_PAGE_SIZE,
((buf_block_t*) bpage)->frame, bpage, trx); ((buf_block_t*) bpage)->frame, bpage, trx);
} }
thd_wait_end(NULL);
if (srv_pass_corrupt_table) { if (srv_pass_corrupt_table) {
if (*err != DB_SUCCESS) { if (*err != DB_SUCCESS) {
...@@ -205,6 +207,7 @@ not_to_recover: ...@@ -205,6 +207,7 @@ not_to_recover:
} }
if (sync) { if (sync) {
thd_wait_end(NULL);
/* The i/o is already completed when we arrive from /* The i/o is already completed when we arrive from
fil_read */ fil_read */
buf_page_io_complete(bpage); buf_page_io_complete(bpage);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment