diff --git a/storage/perfschema/unittest/pfs_instr-oom-t.cc b/storage/perfschema/unittest/pfs_instr-oom-t.cc index db74c9c..5259f14 100644 --- a/storage/perfschema/unittest/pfs_instr-oom-t.cc +++ b/storage/perfschema/unittest/pfs_instr-oom-t.cc @@ -243,11 +243,15 @@ void test_oom() file_1= find_or_create_file(&fake_thread, &dummy_file_class, "dummy", 5, true); ok(file_1 != NULL, "create file"); release_file(file_1); + cleanup_file_hash(); cleanup_instruments(); stub_alloc_always_fails= true; + fake_thread.m_filename_hash_pins = NULL; + init_file_hash(¶m); file_2= find_or_create_file(&fake_thread, &dummy_file_class, "dummy", 5, true); ok(file_2 == NULL, "oom (create file)"); + cleanup_file_hash(); /* Create socket. */ stub_alloc_always_fails = false; @@ -422,7 +426,7 @@ void do_all_tests() int main(int, char **) { - plan(28); + plan(33); MY_INIT("pfs_instr-oom-t"); do_all_tests(); return 0;