Mysql 体系结构系列之五

来源:互联网 发布:诺基亚运行python 编辑:程序博客网 时间:2024/05/18 08:21

前言:接上一篇Mysql 体系结构系列之四: 核心模块之间的交互

                Mysql 体系结构系列之四 : http://blog.csdn.net/u010993297/article/details/9663953

1. 核心模块之间的交互 Interaction of the Core Modules

<<-------第十段 讲的是怎样处理查询或命令(失败/成功)--控制权-连接线程------>>

As the query or command is being processed, the corresponding module may send parts of theresult set to the client as they become available. It may also sendwarnings or an error message.

在处理查询或命令的时候,相应的模块可能会将已得出的部分结果发送给客户端,也可能发送警号或错误信息。

 

If an error message is issued, both the client and the server will understand that the query or command has failed and take the appropriate measures.

如果发送了出错信息,客户端和服务器都会理解为查询或命令已经失败,并会采取相应的措施。


The client will not accept any more result set, warning, or error message data for the given query, while the server will always transfercontrol to the Connection Threadafter issuing an error.

客户端将不再接受给定查询的任何结果集,警告或出错信息数据,而且在发出出错信息后,服务器始终将控制权传送给连接线程。

 

Note that since MySQL does not use exceptions for reasons of implementation stability and portability, all calls on all levels must be checked for errors with the appropriate transfer of control in the case of failure.

注意,出于实现的稳定性和可移植性的考虑,Mysql也不例外,在出现故障时,会检查所有层次上的所以调用,同时适当地转移控制。

 

<<-------第十一段 讲的是二进制更新日志------>>

If the low-level module has made a modification to the data in some way and if thebinary update loggingis enabled,

如果低层次模块以某种方式修改了数据,而且二进制更新日志是启用的

 

the module will be responsible for asking the Logging Module to log the update event to the binary update log, sometimes known as thereplication log, or, among MySQL developers and power users, thebinlog.

那么该模块将负责要求日志记录模块把更新事件记录到二进制更新日志中,有时这个过程也被称为复制日志,但Mysql开发人员和高级用户称其为binlog

 

<<-------第十二段 讲的是执行流-连接线程------>>

Once the task is completed, theexecution flow returns to the Connection Thread,which performs the necessaryclean-up and waits for another query or command from the client.

一旦任务完成,执行流就返回给连接线程,该线程将执行必要的清空工作,等待来自客户端的下一个查询或命令。

 

The session continues until the client issues theQuit command.

会话会继续进行直至客户端发出Quit命令退出。

 

<<-------第十三段 讲的是主复制服务器模块------>>

In addition to interacting with regular clients, aserver may receive a command from areplication slave to continuously read its binary update log.

除了与常规客户端交互,服务器可能还要收取来自从复制服务器的命令,不断读取其二进制更新日志

 

This command will be handled by theReplication Master Module.

这类命令将由主复制服务器模块处理。

 

待续。。。

原创粉丝点击