1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Optimize Sql_alloc

- Remove 'dummy_for_valgrind' overrun marker as this doesn't help much.
  The element also distorts the sizes of objects a bit, which makes it
  harder to calculate gain in object sizes when doing size optimizations.
- Replace usage of thd_get_current_thd() with _current_thd()
- Avoid one extra call indirection when using thd_get_current_thd(), which
  is used by Sql_alloc, by replacing it with _current_thd()
This commit is contained in:
Monty
2020-08-14 18:56:56 +03:00
committed by Sergei Golubchik
parent c76eabfb5e
commit da85ad7987
6 changed files with 11 additions and 23 deletions

View File

@ -325,17 +325,6 @@ bool Foreign_key::validate(List<Create_field> &table_fields)
** Thread specific functions
****************************************************************************/
/**
Get current THD object from thread local data
@retval The THD object for the thread, NULL if not connection thread
*/
THD *thd_get_current_thd()
{
return current_thd;
}
extern "C" unsigned long long thd_query_id(const MYSQL_THD thd)
{
return((unsigned long long)thd->query_id);