Page MenuHomePhabricator

Warning: SQLPlatform::isWriteQuery fallback to regex (ContentTranslation)
Closed, ResolvedPublic

Description

#4 /srv/mediawiki/php-1.41.0-wmf.2/extensions/ContentTranslation/includes/Translator.php(90): Wikimedia\Rdbms\DBConnRef->query(string, string)
#5 /srv/mediawiki/php-1.41.0-wmf.2/extensions/ContentTranslation/includes/ActionApi/ApiQueryContentTranslation.php(195): ContentTranslation\Translator->getLanguages(string)
#6 /srv/mediawiki/php-1.41.0-wmf.2/extensions/ContentTranslation/includes/ActionApi/ApiQueryContentTranslation.php(63): ContentTranslation\ActionApi\ApiQueryContentTranslation->run()

This call to ->query() should either be ported to a different method, or specify one of the ISQLPlatform::QUERY_CHANGE_* constants if that’s not possible.

Event Timeline

Ok, this is another UNION case, like T332941 and T332942.

$res = $dbr->query( $dbr->unionQueries( $queries, false ), __METHOD__ );

Change 904799 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/ContentTranslation@master] Translator: Mark query as read-only

https://gerrit.wikimedia.org/r/904799

Lucas_Werkmeister_WMDE renamed this task from Warning: Wikimedia\Rdbms\Platform\SQLPlatform::isWriteQuery fallback to regex (ContentTranslation) to Warning: SQLPlatform::isWriteQuery fallback to regex (ContentTranslation).Mar 31 2023, 2:26 PM

Change 908279 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/ContentTranslation@master] Translator: Use SelectQueryBuilder, UnionQueryBuilder

https://gerrit.wikimedia.org/r/908279

Change 908279 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Translator: Use SelectQueryBuilder, UnionQueryBuilder

https://gerrit.wikimedia.org/r/908279

Change 904799 abandoned by Lucas Werkmeister (WMDE):

[mediawiki/extensions/ContentTranslation@master] Translator: Mark query as read-only

Reason:

If543f066fd was merged instead.

https://gerrit.wikimedia.org/r/904799