[MDEV-9590] Always print "Engine-independent statistic" warnings and might be filtering columns unintentionally from engines Created: 2016-02-19  Updated: 2016-03-21  Resolved: 2016-03-21

Status: Closed
Project: MariaDB Server
Component/s: Admin statements
Affects Version/s: 10.1.11, 10.1.12
Fix Version/s: 10.1.13

Type: Bug Priority: Major
Reporter: Kristian Kræmmer Nielsen Assignee: Oleksandr Byelkin
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-9769 admin functions have non-localized me... Open
Sprint: 10.1.13

 Description   

Warnings like "Engine-independent statistics are not collected for column 'test'" are always printed even the the Engine-independent statistics are not to be updated.

Demonstration

(root@localhost) [(none)]> create database testdatabase;
Query OK, 1 row affected (0.01 sec)
 
(root@localhost) [(none)]> use testdatabase;
Database changed
 
(root@localhost) [testdatabase]> create table simple (test blob);     
Query OK, 0 rows affected (0.02 sec)
 
(root@localhost) [testdatabase]> show variables like 'use_stat_tables';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| use_stat_tables | NEVER |
+-----------------+-------+
1 row in set (0.00 sec)
 
(root@localhost) [testdatabase]> analyze table simple; 
+---------------------+---------+----------+-------------------------------------------------------------------+
| Table               | Op      | Msg_type | Msg_text                                                          |
+---------------------+---------+----------+-------------------------------------------------------------------+
| testdatabase.simple | analyze | Warning  | Engine-independent statistics are not collected for column 'test' |
| testdatabase.simple | analyze | status   | OK                                                                |
+---------------------+---------+----------+-------------------------------------------------------------------+
2 rows in set (0.00 sec)

The warning should not occur when neither PERSISTENT-clause nor use_stat_tables is set.

I think this recent patch created this problem:
https://github.com/MariaDB/server/commit/825f51d1aab51d363dc07ec9fe0829af33063883

Later in the same function the clause of:

(get_use_stat_tables_mode(thd) > NEVER || 
         lex->with_persistent_for_clause)

is used.

I would suggest this should be wrapped around the patch as well so the warning does not appear.

Also - is the patch actually also filtering columns for the engines themselves? — if so I guess it shouldn't do that either?!

While at it — maybe the should string "Engine-independent statistics collected" should also be internationalized?



 Comments   
Comment by Kristian Kræmmer Nielsen [ 2016-02-19 ]

@sanja / @Oleksandr Byelkin - maybe you can help here?

Comment by Elena Stepanova [ 2016-02-19 ]

jkkn, thanks for the report.

Comment by Oleksandr Byelkin [ 2016-03-17 ]

revision-id: 302f2b05fc5cb7cd7ab13e3844d68c0a4dfb87d6 (mariadb-10.1.12-16-g302f2b0)
parent(s): 9b53d84d14a9b031d193f6beae382a232aa738e3
committer: Oleksandr Byelkin
timestamp: 2016-03-17 15:12:57 +0100
message:

MDEV-9590: Always print "Engine-independent statistic" warnings and might be filtering columns unintentionally from engines

Do not issue the warning in case we are not going to collect the statistics.

Comment by Oleksandr Byelkin [ 2016-03-18 ]

About internationalization. I am not 100% sure if you are talking about the error message, but if so then it is already internationalized: I added it in English and Ukrainian then people who are helping with internationalization will translate it on other languages (AFAIK it is made by volunteers).

If you meant something else then please explain it.

Comment by Kristian Kræmmer Nielsen [ 2016-03-18 ]

About internationalization I was referring to that "Engine-independent statistics collected" is not internationalized (just below) but the error was.

Comment by Oleksandr Byelkin [ 2016-03-19 ]

Ah, here I agree. We have to do something with non-Error&Warning messages. But it is probably not subject of this bugfix. as I can see sql_admin.cc have this enough and so one solution for all them should be found.
You better fill other bug report about it. If you can't that just say and I'll do.

Comment by Kristian Kræmmer Nielsen [ 2016-03-19 ]

Agree. Please do.
Any where I can see the patch for this bug?

Comment by Oleksandr Byelkin [ 2016-03-19 ]

In the next release or in the repository this Monday.

Comment by Oleksandr Byelkin [ 2016-03-21 ]

I've made https://jira.mariadb.org/browse/MDEV-9769

Generated at Thu Feb 08 07:35:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.