1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

perfschema memory related instrumentation changes

This commit is contained in:
Sergei Golubchik
2020-01-29 13:50:26 +01:00
parent 2ac3121af2
commit 7c58e97bf6
307 changed files with 2622 additions and 1743 deletions

View File

@ -955,7 +955,8 @@ TMP_TABLE_SHARE *THD::create_temporary_table(LEX_CUSTRING *frm,
/* Create the table definition key for the temporary table. */
key_length= create_tmp_table_def_key(key_cache, db, table_name);
if (!(share= (TMP_TABLE_SHARE *) my_malloc(sizeof(TMP_TABLE_SHARE) +
if (!(share= (TMP_TABLE_SHARE *) my_malloc(key_memory_table_share,
sizeof(TMP_TABLE_SHARE) +
strlen(path) + 1 + key_length,
MYF(MY_WME))))
{
@ -1002,7 +1003,8 @@ TMP_TABLE_SHARE *THD::create_temporary_table(LEX_CUSTRING *frm,
if (!temporary_tables)
{
if ((temporary_tables=
(All_tmp_tables_list *) my_malloc(sizeof(All_tmp_tables_list),
(All_tmp_tables_list *) my_malloc(key_memory_table_share,
sizeof(All_tmp_tables_list),
MYF(MY_WME))))
{
temporary_tables->empty();
@ -1107,7 +1109,8 @@ TABLE *THD::open_temporary_table(TMP_TABLE_SHARE *share,
DBUG_ENTER("THD::open_temporary_table");
if (!(table= (TABLE *) my_malloc(sizeof(TABLE), MYF(MY_WME))))
if (!(table= (TABLE *) my_malloc(key_memory_TABLE, sizeof(TABLE),
MYF(MY_WME))))
{
DBUG_RETURN(NULL); /* Out of memory */
}