mysql中InnoDB崩溃恢复过程的示例分析
发表于:2025-02-21 作者:千家信息网编辑
千家信息网最后更新 2025年02月21日,这篇文章将为大家详细讲解有关mysql中InnoDB崩溃恢复过程的示例分析,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。1、redo log操作:保证已提交事务影响
千家信息网最后更新 2025年02月21日mysql中InnoDB崩溃恢复过程的示例分析
这篇文章将为大家详细讲解有关mysql中InnoDB崩溃恢复过程的示例分析,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。
1、redo log操作:保证已提交事务影响的最新数据刷到数据页里。
2、undo log操作:保证未提交事务影响的数据页回滚。
3、写缓冲(change buffer)合并。
4、purge操作。
InnoDB的一种垃圾收集机制,使用单独的后台线程周期性处理索引中标记删除的数据。
实例
/* Look for MLOG_CHECKPOINT. */recv_group_scan_log_recs(group, &contiguous_lsn, false);/* The first scan should not have stored or applied any records. */ut_ad(recv_sys->n_addrs == 0);ut_ad(!recv_sys->found_corrupt_fs); if (recv_sys->found_corrupt_log && !srv_force_recovery) {log_mutex_exit();return(DB_ERROR);} if (recv_sys->mlog_checkpoint_lsn == 0) {if (!srv_read_only_mode && group->scanned_lsn != checkpoint_lsn) {ib::error() << "Ignoring the redo log due to missing"" MLOG_CHECKPOINT between the checkpoint "<< checkpoint_lsn << " and the end "<< group->scanned_lsn << ".";if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) {log_mutex_exit();return(DB_ERROR);}} group->scanned_lsn = checkpoint_lsn;rescan = false;} else {contiguous_lsn = checkpoint_lsn;rescan = recv_group_scan_log_recs(group, &contiguous_lsn, false); if ((recv_sys->found_corrupt_log && !srv_force_recovery) || recv_sys->found_corrupt_fs) {log_mutex_exit();return(DB_ERROR);}} /* NOTE: we always do a 'recovery' at startup, but only ifthere is something wrong we will print a message to theuser about recovery: */ if (checkpoint_lsn != flush_lsn) { if (checkpoint_lsn + SIZE_OF_MLOG_CHECKPOINT < flush_lsn) {ib::warn() << " Are you sure you are using the"" right ib_logfiles to start up the database?"" Log sequence number in the ib_logfiles is "<< checkpoint_lsn << ", less than the"" log sequence number in the first system"" tablespace file header, " << flush_lsn << ".";} if (!recv_needed_recovery) { ib::info() << "The log sequence number " << flush_lsn<< " in the system tablespace does not match"" the log sequence number " << checkpoint_lsn<< " in the ib_logfiles!"; if (srv_read_only_mode) {ib::error() << "Can't initiate database"" recovery, running in read-only-mode.";log_mutex_exit();return(DB_READ_ONLY);} recv_init_crash_recovery();}} log_sys->lsn = recv_sys->recovered_lsn; if (recv_needed_recovery) {err = recv_init_crash_recovery_spaces(); if (err != DB_SUCCESS) {log_mutex_exit();return(err);} if (rescan) {contiguous_lsn = checkpoint_lsn;recv_group_scan_log_recs(group, &contiguous_lsn, true); if ((recv_sys->found_corrupt_log && !srv_force_recovery) || recv_sys->found_corrupt_fs) {log_mutex_exit();return(DB_ERROR);}}} else {ut_ad(!rescan || recv_sys->n_addrs == 0);}
关于"mysql中InnoDB崩溃恢复过程的示例分析"这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。
数据
篇文章
示例
过程
分析
事务
更多
保证
影响
不错
实用
内容
后台
周期
周期性
垃圾
实例
文章
机制
标记
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
dell服务器共享网卡
可视化地图 软件开发
王者qq 服务器爆满怎么办
vod服务器部署
2012r2服务器管理
公司使用云数据库吗
新时达服务器故障代码清除
对网络安全系统进行渗透
网络安全应急指挥中心简介
数据库中什么是元组和属性
好玩的网易网络服务器
游戏多服务器
hdmi采集服务器
mysql数据库分区
网络安全与信息化电子版
软件开发工作量评估模板
万方数据库的主要收录特点是什么
东南大学网络安全硕士就业
扬州网络安全主要什么软件
网络安全防护体系等级
数据库时间设置
2012r2服务器管理
苏州电商软件开发销售
法国flu服务器
bde数据库编辑器中文
申请iso9001软件开发
广电网络技术人员工作总结
java数据库开发教程
关于建立首席网络安全官制度
oracle是内存数据库吗