--- /dev/null
+diff -urNpa mysql-8.0.35.orig/sql/mysqld.cc mysql-8.0.35/sql/mysqld.cc
+--- mysql-8.0.35.orig/sql/mysqld.cc 2023-12-20 23:22:13.694682253 +0100
++++ mysql-8.0.35/sql/mysqld.cc 2023-12-20 23:33:27.807838185 +0100
+@@ -1956,7 +1956,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();
+@@ -6095,7 +6094,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
+@@ -7196,7 +7195,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);
+@@ -7286,7 +7285,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 */
+@@ -11212,15 +11211,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.
+@@ -11445,7 +11435,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;
+@@ -11456,7 +11446,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