shatteredsilicon / ssm-submodules

GNU Affero General Public License v3.0
0 stars 2 forks source link

Regression: QAN performance_schema Based Harvesting Doesn't Work In Some Cases #186

Closed gordan-bobic closed 10 months ago

gordan-bobic commented 10 months ago
Error 1146: Table 'performance_schema.prepared_statements_instances' doesn't exist

It looks like the regression is caused by the attempt to harvest at least some information about prepared statements, but this breaks compatibility with older versions of MySQL and MariaDB where performance_schema.prepared_statements_instances doesn't exist. This works with PMM 1.17.5, so this is a regression.

Please, add a check for whether that table in performance_schema exists once when the harvester starts and if it doesn't disable the additional functionality for fetching data from it.

oblitorum commented 10 months ago

I did add a check for older MySQL and MariaDB -> https://github.com/shatteredsilicon/qan-agent/blob/ssm-1.x/qan/analyzer/mysql/worker/perfschema/worker.go#L293-L296

The check must be broken after I updated the golang mysql package, it's working in SSM .1, but not in .2 and .3