Mysql:Changes in MySQL 5.6.0 (Not released, Milestone 4):Global UUID
Changes in MySQL 5.6.0 (Not released, Milestone 4)
-
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 theserver_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 usingSTART SLAVE
, the value of the master's UUID is available on the slave in the output ofSHOW SLAVE STATUS
. (Bug #33815, Bug #11747723)References: See also: Bug #16927, Bug #11745543.
-
Partitioning: It is now possible to exchange a partition of a partitioned table or a subpartition of a subpartitioned table with a nonpartitioned table that otherwise has the same structure using the
ALTER TABLE ... EXCHANGE PARTITION
statement. This can be used, for example, for importing and exporting partitions.For more information and examples, see Exchanging Partitions and Subpartitions with Tables.
-
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 forCHANGE MASTER TO
to set the delay toN
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
andSTOP 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
: WhenSlave_SQL_Running_State
isWaiting until MASTER_DELAY seconds after master executed event
, this field contains the number of seconds left of the delay. At other times, this field isNULL
. -
Slave_SQL_Running_State
: The state of the SQL thread (analogous toSlave_IO_State
). The value is identical to theState
value of the SQL thread as displayed bySHOW PROCESSLIST
.
When the slave SQL thread is waiting for the delay to elapse before executing an event,
SHOW PROCESSLIST
displays itsState
value asWaiting 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)
-
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 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】值,无法获得结果集