Details
Description
sql_alloc() has additional costs compared to direct mem_root allocation:
- function call: it is defined in a separate translation unit and can't be inlined
- it needs to call pthread_getspecific() to get THD::mem_root
It is called dozens of times implicitly by Items. Try to get rid of those calls.
Gliffy Diagrams
Attachments
Issue Links
- is part of
-
MDEV-6152 Remove calls to current_thd while creating Item
-
- Closed
-
- links to
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Michael Widenius, please review attached patch.