8000 mysql plugin: Failed to execute query: Unknown column 'status' in 'where clause · Issue #3533 · collectd/collectd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

mysql plugin: Failed to execute query: Unknown column 'status' in 'where clause #3533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
8000
Self-Perfection opened this issue Aug 20, 2020 · 1 comment · Fixed by #3548
Closed

Comments

@Self-Perfection
Copy link
Contributor
  • Version of collectd: 5.11.0-4
  • Operating system / distribution: Arch linux
  • Kernel version (if applicable): 5.8.1-arch1-1

After upgraded mariadb (10.4.13-1 -> 10.5.5-1) mysql plugins incessantly spews warnings:

$ journalctl -n 10 -eu collectd --no-pager
-- Logs begin at Mon 2020-07-27 21:31:09 MSK, end at Thu 2020-08-20 10:29:03 MSK. --
авг 20 10:28:23 collectd[1454]: mysql plugin: Failed to execute query: Unknown column 'status' in 'where clause'
авг 20 10:28:23 collectd[1454]: mysql plugin: SQL query was: SELECT name, count, type FROM information_schema.innodb_metrics WHERE status = 'enabled'
авг 20 10:28:33 collectd[1454]: mysql plugin: Failed to execute query: Unknown column 'status' in 'where clause'
авг 20 10:28:33 collectd[1454]: mysql plugin: SQL query was: SELECT name, count, type FROM information_schema.innodb_metrics WHERE status = 'enabled'
авг 20 10:28:43 collectd[1454]: mysql plugin: Failed to execute query: Unknown column 'status' in 'where clause'
авг 20 10:28:43 collectd[1454]: mysql plugin: SQL query was: SELECT name, count, type FROM information_schema.innodb_metrics WHERE status = 'enabled'
авг 20 10:28:53 collectd[1454]: mysql plugin: Failed to execute query: Unknown column 'status' in 'where clause'
авг 20 10:28:53 collectd[1454]: mysql plugin: SQL query was: SELECT name, count, type FROM information_schema.innodb_metrics WHERE status = 'enabled'
авг 20 10:29:03 collectd[1454]: mysql plugin: Failed to execute query: Unknown column 'status' in 'where clause'
авг 20 10:29:03 collectd[1454]: mysql plugin: SQL query was: SELECT name, count, type FROM information_schema.innodb_metrics WHERE status = 'enabled'

Apparently schema of information_schema.innodb_metric in new mariadb thas changed:

root@localhost [(none)]> desc information_schema.innodb_metrics;
+-----------------+-------------------------------------------------------------------+------+-----+---------+-------+
| Field           | Type                                                              | Null | Key | Default | Extra |
+-----------------+-------------------------------------------------------------------+------+-----+---------+-------+
| NAME            | varchar(193)                                                      | NO   |     |         |       |
| SUBSYSTEM       | varchar(193)                                                      | NO   |     |         |       |
| COUNT           | bigint(21)                                                        | NO   |     | 0       |       |
| MAX_COUNT       | bigint(21)                                                        | YES  |     | NULL    |       |
| MIN_COUNT       | bigint(21)                                                        | YES  |     | NULL    |       |
| AVG_COUNT       | float                                                             | YES  |     | NULL    |       |
| COUNT_RESET     | bigint(21)                                                        | NO   |     | 0       |       |
| MAX_COUNT_RESET | bigint(21)                                                        | YES  |     | NULL    |       |
| MIN_COUNT_RESET | bigint(21)                                                        | YES  |     | NULL    |       |
| AVG_COUNT_RESET | float                                                             | YES  |     | NULL    |       |
| TIME_ENABLED    | datetime                                                          | YES  |     | NULL    |       |
| TIME_DISABLED   | datetime                                                          | YES  |     | NULL    |       |
| TIME_ELAPSED    | bigint(21)                                                        | YES  |     | NULL    |       |
| TIME_RESET      | datetime                                                          | YES  |     | NULL    |       |
| ENABLED         | int(1)                                                            | NO   |     | 0       |       |
| TYPE            | enum('value','status_counter','set_owner','set_member','counter') | NO   |     | NULL    |       |
| COMMENT         | varchar(193)                                                      | NO   |     |         |       |
+-----------------+-------------------------------------------------------------------+------+-----+---------+-------+

It seems now enabled column should be used instead of status. Also note column type change.

@Self-Perfection
Copy link
Contributor Author

Found commit that changed "status" column to "enabled":
MariaDB/server@d09aec7

Self-Perfection added a commit to Self-Perfection/collectd that referenced this issue Aug 29, 2020
In MariaDB 10.5 information_schema.innodb_metrics was cleaned:
MariaDB/server@d09aec7

String column 'status' was replaced with boolean column 'enabled'.

Therefore we need to modify request for fetching data from that table.

Fixes collectd#3533
frankbielig pushed a commit to frankbielig/collectd that referenced this issue Dec 9, 2020
In MariaDB 10.5 information_schema.innodb_metrics was cleaned:
MariaDB/server@d09aec7

String column 'status' was replaced with boolean column 'enabled'.

Therefore we need to modify request for fetching data from that table.

Fixes collectd#3533
mrunge pushed a commit to mrunge/collectd that referenced this issue Apr 23, 2021
In MariaDB 10.5 information_schema.innodb_metrics was cleaned:
MariaDB/server@d09aec7

String column 'status' was replaced with boolean column 'enabled'.

Therefore we need to modify request for fetching data from that table.

Fixes collectd#3533
carlospeon pushed a commit to carlospeon/collectd that referenced this issue Oct 17, 2022
In MariaDB 10.5 information_schema.innodb_metrics was cleaned:
MariaDB/server@d09aec7

String column 'status' was replaced with boolean column 'enabled'.

Therefore we need to modify request for fetching data from that table.

Fixes collectd#3533
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant
0