rdbms: avoid dbSchema() in Database::replaceLostConnection() and Database::__clone()
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 11 Jul 2019 01:21:51 +0000 (18:21 -0700)
committerKrinkle <krinklemail@gmail.com>
Thu, 11 Jul 2019 01:53:22 +0000 (01:53 +0000)
commitaaf8d30204a23b3f5437b6a0417d3470fb3878dd
treeedc8cfb9a986520cd5e828eee791df594cb9646a
parent50a72860b6eab430160a9504926c6aafa4fb701d
rdbms: avoid dbSchema() in Database::replaceLostConnection() and Database::__clone()

Since dbSchema() always casts the result to a string, using this method
with a call to open() is broken if the RDBMs does not support DB schemas
and thus requires null

Follows-up 7911da9c6f (last week), which added the check in
DatabaseMysqlBase::open() check. Also follows fe0af6cad (last year),
which made dbSchema() consistently return string. Before that, an
implicit null was passed in from Database::factory for mysql, which hid
the class default of empty string.

Bug: T227708
Change-Id: I67207fbaa39c5cc3fe062077cc654f048090e009
includes/libs/rdbms/database/Database.php