MySQL 行清理模块:重新定位聚簇索引节点
/*********************************************************/ 重新定位聚簇索引上的节点,如果找到的话。 @return 如果找到了记录,则为TRUE / static ibool row_purge_reposition_pcur( /======================/ ulint mode, /!< in: 锁定模式 / purge_node_t node, /!< in: 行清理节点 / mtr_t mtr) /!< in: mtr */ { ibool found;
if (node->found_clust) { // 如果已经找到聚簇索引节点
found = btr_pcur_restore_position(mode, &(node->pcur), mtr); // 恢复pcur的位置
return(found);
}
found = row_search_on_row_ref(&(node->pcur), mode, node->table, // 在行引用上搜索
node->ref, mtr);
node->found_clust = found; // 更新是否找到了聚簇索引节点的标志
if (found) { // 如果找到了
btr_pcur_store_position(&(node->pcur), mtr); // 存储pcur的位置
}
return(found);
}
原文地址: https://www.cveoy.top/t/topic/og6i 著作权归作者所有。请勿转载和采集!