title: Race in save-restore of 'charsets_dir' global variable participant mysql_1 participant mysql_2 note over mysql_1: mysql_set_character_set_with_default_collation note over mysql_2: mysql_set_character_set_with_default_collation note over mysql_1: SAVE\ncharsets_dir= 0x56164f9747e0\nsave= 0x56164f9747e0\ncharsets_dir= 0x607000080098 note over mysql_2:SAVE\ncharsets_dir= 0x607000080098\nsave= 0x607000080098\ncharsets_dir= 0x607000087098 note over mysql_1:RESTORE\ncharsets_dir= 0x56164f9747e0 note over mysql_1:static void mysql_close_free_options(MYSQL *mysql)\nmy_free(mysql->options.charset_dir);\nmy_free(0x607000080098) note over mysql_2:RESTORE\ncharsets_dir= 0x607000080098 (It is already freed)