--- /dev/null
+diff -urNpa mysql-8.2.0.orig/sql/mysqld.cc mysql-8.2.0/sql/mysqld.cc
+--- mysql-8.2.0.orig/sql/mysqld.cc 2023-12-30 12:55:09.027295242 +0100
++++ mysql-8.2.0/sql/mysqld.cc 2023-12-30 13:03:21.431172893 +0100
+@@ -1967,7 +1967,6 @@ static void add_terminator(vector<my_opt
+ extern "C" bool mysqld_get_one_option(int, const struct my_option *, char *);
+ static void set_server_version(void);
+ static int init_thread_environment();
+-static const char *get_relative_path(const char *path);
+ static int fix_paths(void);
+ static int test_if_case_insensitive(const char *dir_name);
+ static void end_ssl();
+@@ -7880,7 +7879,7 @@ static char *get_icu_data_directory_in_b
+ // Look for MYSQL_ICU_DATADIR which depends on INSTALL_PRIV_LIBDIR
+ static char *get_icu_data_directory_in_install_dir(char *to) {
+ char buff[FN_REFLEN];
+- const char *mysql_icu_datadir = get_relative_path(MYSQL_ICU_DATADIR);
++ const char *mysql_icu_datadir = MYSQL_ICU_DATADIR;
+ if (test_if_hard_path(mysql_icu_datadir))
+ strmake(buff, mysql_icu_datadir, sizeof(buff) - 1);
+ else
+@@ -8987,7 +8986,7 @@ class Plugin_and_data_dir_option_parser
+ memset(dir, 0, FN_REFLEN);
+
+ convert_dirname(local_plugindir_buffer,
+- plugindir ? plugindir : get_relative_path(PLUGINDIR),
++ plugindir ? plugindir : PLUGINDIR,
+ NullS);
+ (void)my_load_path(local_plugindir_buffer, local_plugindir_buffer,
+ mysql_home);
+@@ -9077,7 +9076,7 @@ int mysqld_main(int argc, char **argv)
+ }
+
+ /* Set data dir directory paths */
+- strmake(mysql_real_data_home, get_relative_path(MYSQL_DATADIR),
++ strmake(mysql_real_data_home, MYSQL_DATADIR,
+ sizeof(mysql_real_data_home) - 1);
+
+ /* Must be initialized early for comparison of options name */
+@@ -13040,15 +13039,6 @@ static void set_server_version(void) {
+ #endif
+ }
+
+-static const char *get_relative_path(const char *path) {
+- if (test_if_hard_path(path) && is_prefix(path, DEFAULT_MYSQL_HOME) &&
+- strcmp(DEFAULT_MYSQL_HOME, FN_ROOTDIR)) {
+- path += strlen(DEFAULT_MYSQL_HOME);
+- while (is_directory_separator(*path)) path++;
+- }
+- return path;
+-}
+-
+ /**
+ Test a file path to determine if the path is compatible with the secure file
+ path restriction.
+@@ -13273,7 +13263,7 @@ static int fix_paths(void) {
+
+ convert_dirname(
+ opt_plugin_dir,
+- opt_plugin_dir_ptr ? opt_plugin_dir_ptr : get_relative_path(PLUGINDIR),
++ opt_plugin_dir_ptr ? opt_plugin_dir_ptr : PLUGINDIR,
+ NullS);
+ (void)my_load_path(opt_plugin_dir, opt_plugin_dir, mysql_home);
+ opt_plugin_dir_ptr = opt_plugin_dir;
+@@ -13284,7 +13274,7 @@ static int fix_paths(void) {
+ FN_LIBCHAR)
+ --mysql_unpacked_real_data_home_len;
+
+- const char *sharedir = get_relative_path(SHAREDIR);
++ const char *sharedir = SHAREDIR;
+ if (test_if_hard_path(sharedir))
+ strmake(buff, sharedir, sizeof(buff) - 1); /* purecov: tested */
+ else