Merge "rdbms: avoid strange uses of empty()"
[lhc/web/wiklou.git] / includes / libs / rdbms / database / DatabaseMysqlBase.php
index cfbe077..a5220b9 100644 (file)
@@ -527,13 +527,16 @@ abstract class DatabaseMysqlBase extends Database {
                // checking if the target table has an auto-increment column that
                // isn't set in $varMap, that seems unlikely to be worth the extra
                // complexity.
-               return ( (int)$row->innodb_autoinc_lock_mode === 0 );
+               return (
+                       in_array( 'NO_AUTO_COLUMNS', $insertOptions ) ||
+                       (int)$row->innodb_autoinc_lock_mode === 0
+               );
        }
 
        /**
         * @return stdClass Process cached row
         */
-       private function getReplicationSafetyInfo() {
+       protected function getReplicationSafetyInfo() {
                if ( $this->replicationInfoRow === null ) {
                        $this->replicationInfoRow = $this->selectRow(
                                false,