mysql - 为什么更新忽略sql查询对复制有影响?

标签 mysql sql replication database-replication

我无法理解为什么更新忽略 sql 查询会对复制产生影响?有人可以解释一种我可以理解的方式,而不是指出基于语句的复制是不安全的。

最佳答案

这位于 UPDATE 语句的帮助页面上

UPDATE IGNORE statements, including those having an ORDER BY clause, are flagged as unsafe for statement-based replication. (This is because the order in which the rows are updated determines which rows are ignored.) With this change, such statements produce a warning in the log when using statement-based mode and are logged using the row-based format when using MIXED mode. (Bug #11758262, Bug #50439) See Section 18.2.1.3, “Determination of Safe and Unsafe Statements in Binary Logging”, for more information.

我觉得很清楚——你的问题到底是什么?

(引用http://dev.mysql.com/doc/refman/5.7/en/update.html)

关于mysql - 为什么更新忽略sql查询对复制有影响?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40271885/

相关文章:

MySQL在文本字段中增加值

java - SQL ORDER BY 子句可以与数据源中的任何列一起使用吗?

c# - Ms Sql server 2008 r2 数据同步

sql-server - SQL Server 复制问题 : does all type of articles have row in publication_database. dbo.sysarticles?

mysql - 仅复制 Cloud SQL (MySQL) 上的某些表 (replicate-do-table)

android - 无法使用来自远程服务器数据库的数据填充 Spinner

mysql - 检查数据库中是否存在值

java - 如何使 JSP 函数仅在调用时运行?

sql - 您如何确定表的多个触发器的优先级?

sql - 如何检查SQL中的列中是否存在特定字符串? (例如 : need to find 'ice' only but not 'service' )