Fix $wgSharedDB with sqlite
authorRyan Schmidt <skizzerz@skizzerz.net>
Tue, 2 Jan 2018 17:56:32 +0000 (11:56 -0600)
committerRyan Schmidt <skizzerz@skizzerz.net>
Tue, 30 Jan 2018 20:03:57 +0000 (14:03 -0600)
commit50aa07938510c1a2e58c62123bb0286dd7560d5a
tree1c840fa8431ecc7a782c18ae367f67081e142172
parent7fa2c9434e1aa2edec76bacd6180d1a75d310655
Fix $wgSharedDB with sqlite

At the time of the constructor, tableAliases will always be an empty
array. As such, the ATTACH command is never run for shared dbs, and we
get query errors when later trying to reference them. This changes it so
that the shared db is attached whenever the table aliases are finally
set.

Since table aliases may be set multiple times, the list of already
attached dbs was moved into class scope so that subsequent calls to set
the aliases do not result in query errors.

Bug: T181962
Change-Id: Ia654e996f54077bc3749b884a528e121ab25a2d2
includes/libs/rdbms/database/DatabaseSqlite.php