Skip to content
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

metric56-ColumnNameMismatch #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JasonBaron
Copy link

quick fix for column naming error when creating views

update logic to match column name
Copy link
Member

@shinguz shinguz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is too simple IMHO. It is made for MariaDB 10.5 and it will break MariaDB 10.3 and MariaDB 10.4 which are still supported until June 2024. MariaDB broke interfaces once again... :-(
MariaDB 10.5 has the 5.7 P_S anyway. So we should change this.
SQL> select plugin_name, PLUGIN_AUTH_VERSION from information_schema.plugins where plugin_name = 'PERFORMANCE_SCHEMA';
+--------------------+---------------------+
| plugin_name | PLUGIN_AUTH_VERSION |
+--------------------+---------------------+
| PERFORMANCE_SCHEMA | 5.7.31 |
+--------------------+---------------------+

@KennethSeiero
Copy link

Thank you. This fixed the error i received trying to install. Altho i just changed the sql select according to your update.

Cmd: mysql -u root -p < ./sys_10.sql

Error:
ERROR 1054 (42S22) at line 78 in file: './views/p_s/metrics_56.sql': Unknown column 'STATUS' in 'field list'

sql version:
mysql Ver 15.1 Distrib 10.5.8-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

grooverdan added a commit to grooverdan/mariadb-sys that referenced this pull request Feb 5, 2021
varchar innodb information_schema columns that where effectively
boolean got replaced by a int in MDEV-19940 in MariaDB-10.5.0.

We use a MariaDB-10.2+ feature EXECUTE IMMEDIATE to form
the VIEW expression correctly based on the version.

Using EXECUTE IMMEDIATE we've effectively broken <=10.1 compatiblity
which is now out of support from MariaDB upstream.

closes FromDual#1
grooverdan added a commit to grooverdan/mariadb-sys that referenced this pull request Feb 6, 2021
DO NOT USE - syntax is not understood MDEV-24795

varchar innodb information_schema columns that where effectively
boolean got replaced by a int in MDEV-19940 in MariaDB-10.5.0.

Using EXECUTE IMMEDIATE we've effectively broken <=10.1 compatiblity
which is now out of support from MariaDB upstream.

closes FromDual#1
@leeee-me
Copy link

leeee-me commented Apr 8, 2021

MariaDB [mysql]> 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   |     |         |       |
+-----------------+-------------------------------------------------------------------+------+-----+---------+-------+

How about ?
IF(ENABLED = 1, 'YES', 'NO') AS Enabled

@VR51
Copy link

VR51 commented Oct 29, 2021

@leeee-me Thank you. This worked for me to resolve installation in MariaDB when I hit the error message ERROR 1054 (42S22) at line 78 in file: './views/p_s/metrics_56.sql': Unknown column 'STATUS' in 'field list'.

@VGzsysadm
Copy link

bump for this

Enter password:
ERROR 1054 (42S22) at line 78 in file: './views/p_s/metrics_56.sql': Unknown column 'STATUS' in 'field list'

Server version: 10.5.15-MariaDB-0+deb11u1-log Debian 11

MariaDB [(none)]> select plugin_name, PLUGIN_AUTH_VERSION from information_schema.plugins where plugin_name = 'PERFORMANCE_SCHEMA';
+--------------------+---------------------+
| plugin_name | PLUGIN_AUTH_VERSION |
+--------------------+---------------------+
| PERFORMANCE_SCHEMA | 5.7.31 |
+--------------------+---------------------+
1 row in set (0.001 sec

@LokyHN
Copy link

LokyHN commented Dec 6, 2022

I've got the same error.

Enter password:
ERROR 1054 (42S22) at line 78 in file: './views/p_s/metrics_56.sql': Unknown column 'STATUS' in 'field list'

MariaDB [none]> select plugin_name, PLUGIN_AUTH_VERSION from information_schema.plugins where plugin_name = 'PERFORMANCE_SCHEMA';
+--------------------+---------------------+
| plugin_name | PLUGIN_AUTH_VERSION |
+--------------------+---------------------+
| PERFORMANCE_SCHEMA | 5.7.31 |
+--------------------+---------------------+
1 row in set (0.116 sec)

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 this pull request may close these issues.

7 participants