mysql数据库层次结构,Mysql 内部结构 / Replication | 层次结构

19.1 Chapter Organization

We distinguish between two levels of the architecture: principles, and rules:

principle

High-level goal that declares how the program shall work, from an external point of view. Principles do not discuss how the code works. An example of a principle is "no row events shall be written to the binlog if binlog_format=statement".

rule

Defines how to implement the principles. Rules can be formulated on a very high level, but they describe implementation (how the code works from the inside) rather than interface (how the program behaves when looking from the outside). An example of a rule is "at ROLLBACK when the transaction cache only contains updates to transactional tables, clear the transaction cache and do not write to the binlog".

In the next section, we list the source code files used by replication and describe what each file contains. The section after describes the replication principles and the following section describes the replication rules. The last section contains very old, obsolete documentation. It will be removed after we have verified that anything useful has been transferred to the main sections.

我们区分两个层次结构之间: 原理和 规则:

原理

从外部来看,作为高层次的标准声明该程序应是如何工作的。原则不讨论该代码是如何工作的。例如某原理的定义是“如果binlog_format =statement,行格式就不应该被写入二进制日志(注意这里的row event指的是binlog_format=row的情况下,binlog里面的event,这个event是binlog二进制里面定义的)”。

规则

定义如何实施的原理。规则可以在一个非常高的水平上制定,但它们描述的如何实现(从代码上看内如何工作的),而不是接口(程序从外面看时如何运行)。规则的一个例子是“当ROLLBACK时,事务缓存包含更新事务表内容,会被清除事务缓存并且不写入二进制日志”。

在下一节中,我们列出了复制使用的源代码文件,并说明每个文件内容。节后介绍复制原理及以下部分介绍复制规则。最后一节包含了很老的,过时的文档。经过我们验证了什么有用的东西已经转移到主要部分将被删除。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值