diff options
author | Sergei Golubchik <serg@mariadb.org> | 2022-12-19 22:49:12 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2023-02-10 10:45:25 +0100 |
commit | 4fa2747a63047dbd84cb6d1633024acf9c4313b5 (patch) | |
tree | 9d75d4b0993690be502f1120b11c4cb8daba002a /extra | |
parent | b30b040b733ff2045ffcd7bdd44f608c7f4912b5 (diff) | |
download | mariadb-git-4fa2747a63047dbd84cb6d1633024acf9c4313b5.tar.gz |
MDEV-29582 post-review fixes
don't include my_progname in the error message, my_error starts from it
automatically, resulting in, like
/usr/bin/mysqladmin: Notice: /usr/bin/mysqladmin is deprecated and will be removed in a future release, use command 'mariadb-admin'
and remove "Notice" so that the problem description would directly
follow the executable name.
make the check to work when the executable is in the PATH
(so, invoked simply like 'mysql' and thus readlink cannot find it)
fix the check in mysql_install_db and mysql_secure_installation to not
print the warning if the intermediate path contains "mysql" substring
add this message also to
* mysql_waitpid
* mysql_convert_table_format
* mysql_find_rows
* mysql_setpermissions
* mysqlaccess
* mysqld_multi
* mysqld_safe
* mysqldumpslow
* mysqlhotcopy
* mysql_ldb
Closes #2273
Diffstat (limited to 'extra')
-rw-r--r-- | extra/mysql_waitpid.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/extra/mysql_waitpid.c b/extra/mysql_waitpid.c index 8f2a5c99395..7409e8f1c69 100644 --- a/extra/mysql_waitpid.c +++ b/extra/mysql_waitpid.c @@ -24,7 +24,6 @@ #include <errno.h> static const char *VER= "1.1"; -static char *progname; static my_bool verbose; void usage(void); @@ -50,7 +49,7 @@ get_one_option(const struct my_option *opt, { switch(opt->id) { case 'V': - printf("%s version %s by Jani Tolonen\n", progname, VER); + printf("%s version %s by Jani Tolonen\n", my_progname, VER); exit(0); case 'I': case '?': @@ -65,7 +64,7 @@ int main(int argc, char *argv[]) { int pid= 0, t= 0, sig= 0; - progname= argv[0]; + MY_INIT(argv[0]); if (handle_options(&argc, &argv, my_long_options, get_one_option)) exit(-1); @@ -96,8 +95,8 @@ int main(int argc, char *argv[]) void usage(void) { - printf("%s version %s by Jani Tolonen\n\n", progname, VER); - printf("usage: %s [options] #pid #time\n\n", progname); + printf("%s version %s by Jani Tolonen\n\n", my_progname, VER); + printf("usage: %s [options] #pid #time\n\n", my_progname); printf("Description: Waits for a program, which program id is #pid, to\n"); printf("terminate within #time seconds. If the program terminates within\n"); printf("this time, or if the #pid no longer exists, value 0 is returned.\n"); |