"SHOW ..." statements update "Rows_fetched" value in "information_schema.user_statistics"
Bug #1510953 reported by
Yura Sorokin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
High
|
Yura Sorokin | ||
5.1 |
Won't Fix
|
Low
|
Yura Sorokin | ||
5.5 |
Fix Released
|
High
|
Yura Sorokin | ||
5.6 |
Fix Released
|
High
|
Yura Sorokin |
Bug Description
When user stats are enabled ("SET GLOBAL userstat = ON"), after executing any statement of the "SHOW ..." family that produces non-empty result, the total number of the sent rows ("Rown_fetched") is updated in the "information_
This happens because of the invalid "if" condition in the "void THD::update_
*******
else if (!sql_command_
*******
which is always "false" and therefore gets optimized out.
no longer affects: | percona-server/5.7 |
To post a comment you must log in.
Also, this condition is considered suspicious and generates compiler's warning on newer versions of GCC (observed on 5.2.1 , Ubuntu 15.10 64-bit).
This could lead to build failures when"-Werror" is enabled.