-
Annamalai Gurusami authored
Problem: The problem happens only when optimizer uses InnoDB for generating internal temporary tables (aka intrinsic temporary tables). A cached select cursor on intrinsic temporary table needs to be re-opened whenever cursor is marked invalid. When the cursor was restored using the old record, we need to adjust the search mode (PAGE_CUR_GE needs to be replaced with PAGE_CUR_G). This is needed because we need to move past the old record. This mode adjustment was done only when prebuilt->m_temp_tree_modified flag was set, which is incorrect. This mode adjustment is needed not only when prebuilt->m_temp_tree_modified flag is set, but also when the cached cursor is marked invalid. Solution: Adjust the search mode unconditionally when restoring the cursor. rb#20268 approved by Allen.
Annamalai Gurusami authoredProblem: The problem happens only when optimizer uses InnoDB for generating internal temporary tables (aka intrinsic temporary tables). A cached select cursor on intrinsic temporary table needs to be re-opened whenever cursor is marked invalid. When the cursor was restored using the old record, we need to adjust the search mode (PAGE_CUR_GE needs to be replaced with PAGE_CUR_G). This is needed because we need to move past the old record. This mode adjustment was done only when prebuilt->m_temp_tree_modified flag was set, which is incorrect. This mode adjustment is needed not only when prebuilt->m_temp_tree_modified flag is set, but also when the cached cursor is marked invalid. Solution: Adjust the search mode unconditionally when restoring the cursor. rb#20268 approved by Allen.
Loading