Bug #92287 | Inconsistent value querying information_schema.statistics collation column | ||
---|---|---|---|
Submitted: | 4 Sep 2018 17:50 | Modified: | 5 Sep 2018 7:21 |
Reporter: | Paul Campbell | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Information schema | Severity: | S3 (Non-critical) |
Version: | 5.7.23, 5.6.41 | OS: | Linux (ubuntu 17.10) |
Assigned to: | CPU Architecture: | x86 |
[4 Sep 2018 17:50]
Paul Campbell
[5 Sep 2018 7:21]
MySQL Verification Team
Hello Paul, Thank you for the report! Verified as described on 5.7.23/5.6.41. regards, Umesh
[5 Sep 2018 7:21]
MySQL Verification Team
- 5.6.41 [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-5.6.41: bin/mysql -uroot -S /tmp/mysql_ushastry.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.6.41 MySQL Community Server (GPL) Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> select `collation` from information_schema.statistics where table_schema = 'sakila' and table_name = 'address' and index_name = 'idx_fk_city_id'\G *************************** 1. row *************************** collation: NULL 1 row in set (0.00 sec) mysql> select `column_name`,`collation` from information_schema.statistics where table_schema = 'sakila' and table_name = 'address' and index_name = 'idx_fk_city_id'\G *************************** 1. row *************************** column_name: city_id collation: NULL 1 row in set (0.00 sec) mysql> select * from information_schema.statistics where table_schema = 'sakila' and table_name = 'address' and index_name = 'idx_fk_city_id'\G *************************** 1. row *************************** TABLE_CATALOG: def TABLE_SCHEMA: sakila TABLE_NAME: address NON_UNIQUE: 1 INDEX_SCHEMA: sakila INDEX_NAME: idx_fk_city_id SEQ_IN_INDEX: 1 COLUMN_NAME: city_id COLLATION: A CARDINALITY: 603 SUB_PART: NULL PACKED: NULL NULLABLE: INDEX_TYPE: BTREE COMMENT: INDEX_COMMENT: 1 row in set (0.00 sec) -- 5.7.23 [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-5.7.23: bin/mysql -uroot -S /tmp/mysql_ushastry.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5 Server version: 5.7.23 MySQL Community Server (GPL) Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> select `collation` from information_schema.statistics where table_schema = 'sakila' and table_name = 'address' and index_name = 'idx_fk_city_id'\G *************************** 1. row *************************** collation: NULL 1 row in set (0.00 sec) mysql> select `column_name`,`collation` from information_schema.statistics where table_schema = 'sakila' and table_name = 'address' and index_name = 'idx_fk_city_id'\G *************************** 1. row *************************** column_name: city_id collation: NULL 1 row in set (0.00 sec) mysql> select * from information_schema.statistics where table_schema = 'sakila' and table_name = 'address' and index_name = 'idx_fk_city_id'\G *************************** 1. row *************************** TABLE_CATALOG: def TABLE_SCHEMA: sakila TABLE_NAME: address NON_UNIQUE: 1 INDEX_SCHEMA: sakila INDEX_NAME: idx_fk_city_id SEQ_IN_INDEX: 1 COLUMN_NAME: city_id COLLATION: A CARDINALITY: 599 SUB_PART: NULL PACKED: NULL NULLABLE: INDEX_TYPE: BTREE COMMENT: INDEX_COMMENT: 1 row in set (0.00 sec) mysql> \s -------------- bin/mysql Ver 14.14 Distrib 5.7.23, for el7 (x86_64) using EditLine wrapper Connection id: 5 Current database: Current user: root@localhost SSL: Not in use Current pager: more Using outfile: '' Using delimiter: ; Server version: 5.7.23 MySQL Community Server (GPL) Protocol version: 10 Connection: Localhost via UNIX socket Server characterset: latin1 Db characterset: latin1 Client characterset: utf8 Conn. characterset: utf8 UNIX socket: /tmp/mysql_ushastry.sock Uptime: 26 min 22 sec Threads: 1 Questions: 1129 Slow queries: 0 Opens: 145 Flush tables: 1 Open tables: 127 Queries per second avg: 0.713 --------------
[5 Sep 2018 7:22]
MySQL Verification Team
# Issue not observed on 8.0.12 -- 8.0.12 [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-8.0.12: bin/mysql -uroot -S /tmp/mysql_ushastry.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 9 Server version: 8.0.12 MySQL Community Server - GPL Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> select `collation` from information_schema.statistics where table_schema = 'sakila' and table_name = 'address' and index_name = 'idx_fk_city_id'\G *************************** 1. row *************************** COLLATION: A 1 row in set (0.00 sec) mysql> select `column_name`,`collation` from information_schema.statistics where table_schema = 'sakila' and table_name = 'address' and index_name = 'idx_fk_city_id'\G *************************** 1. row *************************** COLUMN_NAME: city_id COLLATION: A 1 row in set (0.00 sec) mysql> select * from information_schema.statistics where table_schema = 'sakila' and table_name = 'address' and index_name = 'idx_fk_city_id'\G *************************** 1. row *************************** TABLE_CATALOG: def TABLE_SCHEMA: sakila TABLE_NAME: address NON_UNIQUE: 1 INDEX_SCHEMA: sakila INDEX_NAME: idx_fk_city_id SEQ_IN_INDEX: 1 COLUMN_NAME: city_id COLLATION: A CARDINALITY: 599 SUB_PART: NULL PACKED: NULL NULLABLE: INDEX_TYPE: BTREE COMMENT: INDEX_COMMENT: IS_VISIBLE: YES 1 row in set (0.02 sec)
[6 Sep 2018 7:45]
Ståle Deraas
Posted by developer: Fixing this bug in an existing GA, might impact applications. So if this is to be fixed in 5.7 or lower versions, this must be carefully considered. The issue is fixed in 8.0, as stated in the report.