Author: ironiridis
Description:
When refreshing a category page, MediaWiki issues a query to my PostgreSQL backend ending in "LOCK IN SHARED MODE". This isn't valid syntax to PGSQL.
I have edited my copy of includes/db/Database.php, DatabaseBase::selectSQLText() to include...
if ($this->getType() == 'postgres' and (in_array('LOCK IN SHARE MODE', $options, true) or isset($options['LOCK IN SHARE MODE']))) { // just fail //throw new Exception('Cannot use LOCK IN SHARE MODE with Postgresql'); // or just remove the option unset($options['LOCK IN SHARE MODE']); unset($options[array_search('LOCK IN SHARE MODE', $options, true)]); }
The lack of a locking operation seems to me to be a better tradeoff than a category page flooded with pg_query error output.
Version: 1.19.0
Severity: major