Make insertSelect() do two separate queries in non-CLI mode
authorAaron Schulz <aschulz@wikimedia.org>
Sat, 27 Aug 2016 17:10:46 +0000 (10:10 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 1 Sep 2016 00:21:30 +0000 (17:21 -0700)
commit52d2ebb30a0fc801cd1dcc952bec7cbcf73ceb53
treeffe6dd2618f2b6dc4a2ea20614891086fe8d6f0b
parentb99c3a366459d3015b3452f9f25eb9999d5cd561
Make insertSelect() do two separate queries in non-CLI mode

This avoids slave lag and makes query time account easier.
It also avoids table-level autoinc locking and slave drift
with statement-based replication in some setups.

Also refactored the use of $wgCommandLine mode in
DatabaseBase slightly, so that it can be injected.

Change-Id: I2dba6024ecf32c9ee24a3080cce3b02568c1458b
includes/DefaultSettings.php
includes/db/Database.php
includes/db/DatabaseMssql.php
includes/db/DatabaseOracle.php
includes/db/DatabasePostgres.php
tests/phpunit/includes/db/DatabaseSQLTest.php
tests/phpunit/includes/db/DatabaseTestHelper.php