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:
@ -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);
|
||||
|
Reference in New Issue
Block a user