Open bootc opened 1 year ago
Hi @bootc . Thank you for the report.
Indeed, SET STATEMENT
is not supported at the moment, and its implementation isn't trivial because indeed it is not even a SET
statement, but a SELECT
statement with an attribute set by SET
.
At the moment my only suggestion is a workaround.
Using a mysql_query_rules
to rewrite :
SET /* MediaWiki\Extension\DynamicPageList\Hooks::processQuery - Library:MySQL */ STATEMENT max_statement_time=10 FOR SELECT`
into simply SELECT
. I know, this will lose the query timeout ...
Because you have max_statement_time
I assume you are using MariaDB , that has a completely different syntax than MySQL. If you were using MySQL you could rewrite the query as:
SELECT /*+ max_execution_time=10000 */
(and optionally also copy the rest of the comment).
I hope this helps.
Yes, this is using MariaDB indeed. If this is a known issue, could ProxySQL perhaps do its own rewriting of the query internally into the MySQL syntax which it understands, and then back out again on the way back to MariaDB? Perhaps this could even be a ProxySQL selling point helping with MySQL/MariaDB cross compatibility?
Yes for now I can rewrite the query or maybe change the SubPageList configuration to work around this.
MediaWiki 1.39.3 with the DynamicPageList extension produces SET queries which cause the connection to be locked to a particular hostgroup:
This is using ProxySQL 2.5.3 using the
proxysql/proxysql:2.5.3
Docker container image.