1 diff -urNpa mysql-8.4.0.orig/sql/mysqld.cc mysql-8.4.0/sql/mysqld.cc
2 --- mysql-8.4.0.orig/sql/mysqld.cc 2024-05-09 14:56:29.863000671 +0200
3 +++ mysql-8.4.0/sql/mysqld.cc 2024-05-09 14:56:52.199313987 +0200
4 @@ -1954,7 +1954,6 @@ static void add_terminator(vector<my_opt
5 extern "C" bool mysqld_get_one_option(int, const struct my_option *, char *);
6 static void set_server_version(void);
7 static int init_thread_environment();
8 -static const char *get_relative_path(const char *path);
9 static int fix_paths(void);
10 static int test_if_case_insensitive(const char *dir_name);
11 static void end_ssl();
12 @@ -7732,7 +7731,7 @@ static char *get_icu_data_directory_in_b
13 // Look for MYSQL_ICU_DATADIR which depends on INSTALL_PRIV_LIBDIR
14 static char *get_icu_data_directory_in_install_dir(char *to) {
16 - const char *mysql_icu_datadir = get_relative_path(MYSQL_ICU_DATADIR);
17 + const char *mysql_icu_datadir = MYSQL_ICU_DATADIR;
18 if (test_if_hard_path(mysql_icu_datadir))
19 strmake(buff, mysql_icu_datadir, sizeof(buff) - 1);
21 @@ -8820,7 +8819,7 @@ class Plugin_and_data_dir_option_parser
22 memset(dir, 0, FN_REFLEN);
24 convert_dirname(local_plugindir_buffer,
25 - plugindir ? plugindir : get_relative_path(PLUGINDIR),
26 + plugindir ? plugindir : PLUGINDIR,
28 (void)my_load_path(local_plugindir_buffer, local_plugindir_buffer,
30 @@ -8915,7 +8914,7 @@ int mysqld_main(int argc, char **argv)
31 argv_cached[argc_cached] = nullptr;
33 /* Set data dir directory paths */
34 - strmake(mysql_real_data_home, get_relative_path(MYSQL_DATADIR),
35 + strmake(mysql_real_data_home, MYSQL_DATADIR,
36 sizeof(mysql_real_data_home) - 1);
38 /* Must be initialized early for comparison of options name */
39 @@ -12784,15 +12783,6 @@ static void set_server_version(void) {
43 -static const char *get_relative_path(const char *path) {
44 - if (test_if_hard_path(path) && is_prefix(path, DEFAULT_MYSQL_HOME) &&
45 - strcmp(DEFAULT_MYSQL_HOME, FN_ROOTDIR)) {
46 - path += strlen(DEFAULT_MYSQL_HOME);
47 - while (is_directory_separator(*path)) path++;
53 Test a file path to determine if the path is compatible with the secure file
55 @@ -13010,7 +13000,7 @@ static int fix_paths(void) {
59 - opt_plugin_dir_ptr ? opt_plugin_dir_ptr : get_relative_path(PLUGINDIR),
60 + opt_plugin_dir_ptr ? opt_plugin_dir_ptr : PLUGINDIR,
62 (void)my_load_path(opt_plugin_dir, opt_plugin_dir, mysql_home);
63 opt_plugin_dir_ptr = opt_plugin_dir;
64 @@ -13021,7 +13011,7 @@ static int fix_paths(void) {
66 --mysql_unpacked_real_data_home_len;
68 - const char *sharedir = get_relative_path(SHAREDIR);
69 + const char *sharedir = SHAREDIR;
70 if (test_if_hard_path(sharedir))
71 strmake(buff, sharedir, sizeof(buff) - 1); /* purecov: tested */