mysql InnoDB的崩溃恢复过程是什么
发表于:2025-02-04 作者:千家信息网编辑
千家信息网最后更新 2025年02月04日,本篇内容介绍了"mysql InnoDB的崩溃恢复过程是什么"的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有
千家信息网最后更新 2025年02月04日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安全错误
数据库的锁怎样保障安全
在云服务器上运行有什么不一样
广州千秋软件开发有限公司怎么样
有关网络安全的作文题目
风林火山网络技术有效公司
监利天气预报软件开发
pop发件服务器
携号转网时代运营商归属数据库
浙江高中信息技术网络技术
计算机软件开发风险
勘博上海网络技术有限公司
平谷区专业软件开发包括什么
软件开发顶岗实习周报怎么写
自建ip代理服务器
查询数据库是否支持某函数
服务器数据库映射外部端口
服务器硬盘的raid
rust服务器管理指令
盐城集中式分布式存储数据库
光传感通信与网络技术
有哪些网络安全培训机构
dayz显示服务器版本
大型新闻网站数据库设计
网络安全法法律框架是怎样的
软件开发最好的培训
广东汕尾云服务 服务器
各城市碳排放数据库
系统管理不能登陆到加密服务器
软件开发顶岗实习周报怎么写
西安软件开发兼职网
珠海酒店软件开发订制