Skip to content

Commit 99751d8

Browse files
author
Aditya A
committed
Revert "Bug #21133329 HANGING "SYSTEM LOCK" WHEN EXECUTING "FLUSH TABLE ... FOR EXPORT""
This reverts commit 66b7e4af49af98f8d38caf1f52f6ab0dc1cc99ab.
1 parent d730927 commit 99751d8

File tree

3 files changed

+7
-96
lines changed

3 files changed

+7
-96
lines changed

mysql-test/suite/innodb/r/innodb-flush-hang.result

Lines changed: 0 additions & 36 deletions
This file was deleted.

mysql-test/suite/innodb/t/innodb-flush-hang.test

Lines changed: 0 additions & 50 deletions
This file was deleted.

storage/innobase/ibuf/ibuf0ibuf.cc

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2562,7 +2562,7 @@ ibuf_get_merge_pages(
25622562
Contracts insert buffer trees by reading pages to the buffer pool.
25632563
@return a lower limit for the combined size in bytes of entries which
25642564
will be merged from ibuf trees to the pages read, 0 if ibuf is
2565-
empty or there are no pages to merge*/
2565+
empty */
25662566
static
25672567
ulint
25682568
ibuf_merge_pages(
@@ -2617,15 +2617,10 @@ ibuf_merge_pages(
26172617
ibuf_mtr_commit(&mtr);
26182618
btr_pcur_close(&pcur);
26192619

2620-
if (*n_pages == 0) {
2621-
ut_ad(sum_sizes == 0);
2622-
return(0);
2623-
}
2624-
26252620
buf_read_ibuf_merge_pages(
26262621
sync, space_ids, space_versions, page_nos, *n_pages);
26272622

2628-
return(sum_sizes);
2623+
return(sum_sizes + 1);
26292624
}
26302625

26312626
/*********************************************************************//**
@@ -2651,8 +2646,7 @@ ibuf_get_table(
26512646
Contracts insert buffer trees by reading pages to the buffer pool.
26522647
@return a lower limit for the combined size in bytes of entries which
26532648
will be merged from ibuf trees to the pages read, 0 if ibuf is
2654-
empty or if there are no pages to merge */
2655-
2649+
empty */
26562650
static
26572651
ulint
26582652
ibuf_merge_space(
@@ -2699,13 +2693,16 @@ ibuf_merge_space(
26992693
&pages[0], &spaces[0], &versions[0], n_pages,
27002694
&mtr);
27012695

2696+
++sum_sizes;
27022697
}
27032698

27042699
ibuf_mtr_commit(&mtr);
27052700

27062701
btr_pcur_close(&pcur);
27072702

2708-
if (*n_pages > 0) {
2703+
if (sum_sizes > 0) {
2704+
2705+
ut_a(*n_pages > 0 || sum_sizes == 1);
27092706

27102707
#ifdef UNIV_DEBUG
27112708
ut_ad(*n_pages <= UT_ARR_SIZE(pages));

0 commit comments

Comments
 (0)