diff options
author | Jochen Neumeister <joneum@FreeBSD.org> | 2024-05-24 18:08:52 +0200 |
---|---|---|
committer | Jochen Neumeister <joneum@FreeBSD.org> | 2024-05-24 18:15:44 +0200 |
commit | 3c10befc00dadfb8ff0db2e9016ef092df855345 (patch) | |
tree | 750fd5f30964323d1f52e0213e507e3f8bb50da1 /databases/mysql84-server/files/patch-mysys_my__default.cc | |
parent | net/Makefile: Add missing entries (diff) |
databases/mysql84-{server|client}: add new Ports
Welcome MySQL 8.4
What is new in MySQL8.4 since MySQL 8.0:
https://dev.mysql.com/doc/refman/8.4/en/mysql-nutshell.html
HINT: MySQL8.2+ supports only 64-bit platforms!!!
special thanks for the majority of the work on this port: samm aka Alex
S.
Diffstat (limited to 'databases/mysql84-server/files/patch-mysys_my__default.cc')
-rw-r--r-- | databases/mysql84-server/files/patch-mysys_my__default.cc | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/databases/mysql84-server/files/patch-mysys_my__default.cc b/databases/mysql84-server/files/patch-mysys_my__default.cc new file mode 100644 index 000000000000..3ab4649e0467 --- /dev/null +++ b/databases/mysql84-server/files/patch-mysys_my__default.cc @@ -0,0 +1,62 @@ +--- mysys/my_default.cc.orig 2024-04-10 06:26:28 UTC ++++ mysys/my_default.cc +@@ -209,7 +209,7 @@ bool no_defaults = false; + + /* Which directories are searched for options (and in which order) */ + +-#define MAX_DEFAULT_DIRS 6 ++#define MAX_DEFAULT_DIRS 7 + #define DEFAULT_DIRS_SIZE (MAX_DEFAULT_DIRS + 1) /* Terminate with NULL */ + static const char **default_directories = nullptr; + +@@ -962,6 +962,14 @@ static int search_default_file_with_ext(Process_option + return 1; /* Ignore wrong files */ + } + ++ if (strstr(name, "/etc") == name) ++ { ++ fprintf(stderr, ++ "error: Config file %s in invalid location, please move to or merge with /usr/local%s\n", ++ name,name); ++ goto err; ++ } ++ + while (true) { + auto fileline = mysql_file_getline(buff, sizeof(buff), fp, is_login_file); + char *linebuff = fileline.get(); +@@ -1351,7 +1359,8 @@ void my_print_default_files(const char *conf_file) { + end[(strlen(end) - 1)] = ' '; + else + strxmov(end, conf_file, *ext, " ", NullS); +- fputs(name, stdout); ++ if (strstr(name, "/etc") != name) ++ fputs(name, stdout); + } + } + } +@@ -1693,14 +1702,9 @@ static const char **init_default_directories(MEM_ROOT + + #else + +- errors += add_directory(alloc, "/etc/", dirs); +- errors += add_directory(alloc, "/etc/mysql/", dirs); ++ errors += add_directory(alloc, "/usr/local/etc/", dirs); ++ errors += add_directory(alloc, "/usr/local/etc/mysql/", dirs); + +-#if defined(DEFAULT_SYSCONFDIR) +- if (DEFAULT_SYSCONFDIR[0]) +- errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs); +-#endif /* DEFAULT_SYSCONFDIR */ +- + #endif + + if ((env = getenv("MYSQL_HOME"))) errors += add_directory(alloc, env, dirs); +@@ -1765,7 +1769,7 @@ int check_file_permissions(const char *file_name, bool + #if !defined(_WIN32) + MY_STAT stat_info; + +- if (!my_stat(file_name, &stat_info, flags)) return 1; ++ if (!my_stat(file_name, &stat_info, flags)) return 0; + /* + Ignore .mylogin.cnf file if not exclusively readable/writable + by current user. |