Suboptimal userstat code
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
Low
|
Alexey Kopytov | ||
5.1 |
Won't Fix
|
Undecided
|
Unassigned | ||
5.5 |
Fix Released
|
Low
|
Alexey Kopytov | ||
5.6 |
Fix Released
|
Low
|
Alexey Kopytov |
Bug Description
In close_thread_
if(table->file)
{
table-
table-
}
What update_
Problems:
- 2 functions calls even if userstats are disabled.
- we probably don't need to zero all those data structures if userstats are disabled, as they are initialized to zero in handler::ha_open()
- even if we do have to zero them on close, why not memset() for the array, as the code for handler::ha_open() does?
Related branches
- Stewart Smith (community): Approve
-
Diff: 251 lines (+58/-41)6 files modifiedPercona-Server/sql/handler.cc (+7/-17)
Percona-Server/sql/sql_base.cc (+9/-3)
Percona-Server/sql/sql_class.cc (+1/-3)
Percona-Server/sql/sql_connect.cc (+9/-6)
Percona-Server/sql/sql_parse.cc (+6/-2)
Percona-Server/sql/sql_prepare.cc (+26/-10)
- Laurynas Biveinis (community): Approve
-
Diff: 1545 lines (+617/-233)21 files modifiedPercona-Server/sql/handler.cc (+7/-17)
Percona-Server/sql/sql_base.cc (+9/-3)
Percona-Server/sql/sql_class.cc (+1/-3)
Percona-Server/sql/sql_connect.cc (+9/-6)
Percona-Server/sql/sql_parse.cc (+6/-2)
Percona-Server/sql/sql_prepare.cc (+26/-10)
Percona-Server/storage/innobase/include/read0read.h (+7/-4)
Percona-Server/storage/innobase/include/read0read.ic (+11/-28)
Percona-Server/storage/innobase/include/trx0sys.h (+58/-10)
Percona-Server/storage/innobase/include/trx0sys.ic (+66/-13)
Percona-Server/storage/innobase/include/trx0trx.h (+24/-0)
Percona-Server/storage/innobase/lock/lock0lock.cc (+13/-3)
Percona-Server/storage/innobase/read/read0read.cc (+82/-114)
Percona-Server/storage/innobase/row/row0sel.cc (+2/-2)
Percona-Server/storage/innobase/row/row0vers.cc (+5/-8)
Percona-Server/storage/innobase/trx/trx0sys.cc (+10/-0)
Percona-Server/storage/innobase/trx/trx0trx.cc (+177/-10)
policy/apparmor/usr.sbin.mysqld (+61/-0)
policy/apparmor/usr.sbin.mysqld.local (+2/-0)
policy/selinux/percona-server.fc (+6/-0)
policy/selinux/percona-server.te (+35/-0)
tags: | added: userstat |
tags: |
added: userstats removed: userstat |
tags: | added: low-hanging-fruit |
tags: |
added: userstat removed: userstats |
Percona now uses JIRA for bug reports so this bug report is migrated to: https:/ /jira.percona. com/browse/ PS-1969