随笔 - 746  文章 - 0  评论 - 39  阅读 - 79万

Mysql:Changes in MySQL 5.6.0 (Not released, Milestone 4):Global UUID

Changes in MySQL 5.6.0 (Not released, Milestone 4)

Globally Unique Server IDs

  • Replication: Globally unique IDs for MySQL servers were implemented. A UUID is now obtained automatically when the MySQL server starts. The server first checks for a UUID written in the auto.cnf file (in the server's data directory), and uses this UUID if found. Otherwise, the server generates a new UUID and saves it to this file (and creates the file if it does not already exist). This UUID is available as the server_uuid system variable.

    MySQL replication masters and slaves know each other's UUIDs. The value of a slave's UUID can be read in the output of SHOW SLAVE HOSTS. After a slave is started using START SLAVE, the value of the master's UUID is available on the slave in the output of SHOW SLAVE STATUS. (Bug #33815, Bug #11747723)

    References: See also: Bug #16927, Bug #11745543.

Functionality Added or Changed

  • Replication: MySQL now supports delayed replication such that a slave server deliberately lags behind the master by at least a specified amount of time. The default delay is 0 seconds. Use the new MASTER_DELAY option for CHANGE MASTER TO to set the delay to N seconds:

    CHANGE MASTER TO MASTER_DELAY = N;
    

    An event received from the master is not executed until at least N seconds later than its execution on the master.

    START SLAVE and STOP SLAVE take effect immediately and ignore any delay. RESET SLAVE resets the delay to 0.

    SHOW SLAVE STATUS has three new fields that provide information about the delay:

    • SQL_Delay: The number of seconds that the slave must lag the master.

    • SQL_Remaining_Delay: When Slave_SQL_Running_State is Waiting until MASTER_DELAY seconds after master executed event, this field contains the number of seconds left of the delay. At other times, this field is NULL.

    • Slave_SQL_Running_State: The state of the SQL thread (analogous to Slave_IO_State). The value is identical to the State value of the SQL thread as displayed by SHOW PROCESSLIST.

    When the slave SQL thread is waiting for the delay to elapse before executing an event, SHOW PROCESSLIST displays its State value as Waiting until MASTER_DELAY seconds after master executed event.

    The relay-log.info file now contains the delay value, so the file format has changed. See Slave Status Logs. In particular, the first line of the file now indicates how many lines are in the file. If you downgrade a slave server to a version older than MySQL 5.6, the older server will not read the file correctly. To address this, modify the file in a text editor to delete the initial line containing the number of lines.

    The introduction of delayed replication entails these restrictions:

    • Previously the BINLOG statement could execute all types of events. Now it can execute only format description events and row events.

    • The output from mysqlbinlog --base64-output=ALWAYS cannot be parsed. ALWAYS becomes an invalid value for this option in 5.6.1.

    For additional information, see Delayed Replication. (Bug #28760, Bug #11746794)

 

posted on   jinzhenshui  阅读(159)  评论(0编辑  收藏  举报
编辑推荐:
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)
历史上的今天:
2014-03-29 Oracle:create pfile from spfile:rac下要小心该操作啊!
2013-03-29 Oracle:管理 date类型 interval 动态变化的分区:查询、删除
2013-03-29 JDBC 访问 Oracle ,如果结果集 中的字段 含有【null】值,无法获得结果集

点击右上角即可分享
微信分享提示