Make DatabaseMysqlBase::insertSelect() safer to use
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 26 Jan 2018 06:02:22 +0000 (22:02 -0800)
committerBrad Jorsch <bjorsch@wikimedia.org>
Fri, 26 Jan 2018 17:10:22 +0000 (09:10 -0800)
commitd40916cb85ebfe46cf87d408472cf01023d13812
tree2c5baf739d76b7175e169714dee98e38e042fc3a
parent1fdfc0e816b5e35eb893b9b5254d9aeb16c1ae5b
Make DatabaseMysqlBase::insertSelect() safer to use

Certain server configurations, including the current MariaDB defaults,
make INSERT SELECT unsafe for replication in MySQL/MariaDB. When the
server configuration is not known to be safe, force the use of the
non-native implementation. Note this only has effect in CLI mode, as
non-CLI mode already forces the non-native implementation since
I2dba6024.

Also, native INSERT SELECT won't be safe with any statement-based
replication method if the order of rows in the SELECT is not
deterministic. Add a warning to the method's documentation pointing this
out.

Change-Id: I9173f6559809bd01830bd0a9f443c7269cc58ce2
includes/libs/rdbms/database/DatabaseMysqlBase.php
includes/libs/rdbms/database/IDatabase.php