rdbms: fix transaction flushing in Database::close
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 10 Apr 2018 23:56:29 +0000 (16:56 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 11 Apr 2018 05:31:31 +0000 (22:31 -0700)
commitf9d10f9e0321151914159773edca3b8eb17dfa54
tree2e2e59f9d0a6d2a15c6e0d3e085aa62bf8ecd2e9
parent0898ab0a5d99c0d92c83d26d8b8b090f76e023de
rdbms: fix transaction flushing in Database::close

Use the right IDatabase constants for the $flush parameter to
the commit() and rollback() calls.

This fixes a regression from 3975e04cf4d1.

Also validate the mode/flush parameters to begin() and commit().

Bug: T191916
Change-Id: I0992f9a87f2add303ed309efcc1adb781baecfdc
includes/libs/rdbms/database/Database.php
includes/libs/rdbms/database/IDatabase.php
tests/phpunit/includes/libs/rdbms/database/DatabaseSQLTest.php