Optimize handler_stats_disable() when handler_stats are already disabled
MDEV-33502 Slowdown when running nested statement with many partitions
This commit is contained in:
parent
a8f6b86c90
commit
d4e1731fbc
@ -3456,6 +3456,7 @@ public:
|
||||
("handler created F_UNLCK %d F_RDLCK %d F_WRLCK %d",
|
||||
F_UNLCK, F_RDLCK, F_WRLCK));
|
||||
reset_statistics();
|
||||
active_handler_stats.active= 0;
|
||||
}
|
||||
virtual ~handler(void)
|
||||
{
|
||||
@ -4877,9 +4878,12 @@ public:
|
||||
}
|
||||
inline void ha_handler_stats_disable()
|
||||
{
|
||||
handler_stats= 0;
|
||||
active_handler_stats.active= 0;
|
||||
handler_stats_updated();
|
||||
if (handler_stats)
|
||||
{
|
||||
handler_stats= 0;
|
||||
active_handler_stats.active= 0;
|
||||
handler_stats_updated();
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user