Skip to content

Commit

Permalink
and more
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Mar 28, 2024
1 parent f71f133 commit b7bdac8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
10 changes: 10 additions & 0 deletions storage/perfschema/pfs.cc
Expand Up @@ -1937,7 +1937,17 @@ pfs_drop_table_share_v1(my_bool temporary,
return;
PFS_thread *pfs_thread= my_thread_get_THR_PFS();
if (unlikely(pfs_thread == NULL))
{
fprintf(stderr, "PFS: thread=0 %.*s.%.*s\n", schema_name_length, schema_name,
table_name_length, table_name);
return;
}
{
THD *thd= current_thd;
if (thd)
fprintf(stderr, "PFS: %.*s\n", (int)thd->query_string.length(),
thd->query_string.str());
}
/* TODO: temporary tables */
drop_table_share(pfs_thread, temporary, schema_name, schema_name_length,
table_name, table_name_length);
Expand Down
9 changes: 9 additions & 0 deletions storage/perfschema/pfs_instr_class.cc
Expand Up @@ -1952,7 +1952,11 @@ void drop_table_share(PFS_thread *thread,
PFS_table_share_key key;
LF_PINS* pins= get_table_share_hash_pins(thread);
if (unlikely(pins == NULL))
{
fprintf(stderr, "PFS: pins=0 %.*s.%.*s\n", schema_name_length, schema_name,
table_name_length, table_name);
return;
}
set_table_share_key(&key, temporary, schema_name, schema_name_length,
table_name, table_name_length);
PFS_table_share **entry;
Expand All @@ -1969,6 +1973,11 @@ void drop_table_share(PFS_thread *thread,

pfs->m_lock.allocated_to_free();
}
else
{
fprintf(stderr, "PFS: entry=%p %.*s.%.*s\n", entry, schema_name_length, schema_name,
table_name_length, table_name);
}

lf_hash_search_unpin(pins);
}
Expand Down
2 changes: 2 additions & 0 deletions storage/perfschema/unittest/pfs_server_stubs.cc
Expand Up @@ -61,3 +61,5 @@ enum sys_var::where get_sys_var_value_origin(void *ptr)
}

MY_TIMER_INFO sys_timer_info;

THD *_current_thd() { return 0; }

0 comments on commit b7bdac8

Please sign in to comment.