diff options
author | Monty <monty@mariadb.org> | 2017-11-30 17:03:55 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2017-12-02 12:04:54 +0200 |
commit | c24d1d665c907c8f8c98fc0e7ec986145b9fc757 (patch) | |
tree | 4a797f4bf4e917e150e927ad6e1c98d457830a50 | |
parent | cfaaace635acef042c91d603039f366249ee7878 (diff) | |
download | mariadb-git-c24d1d665c907c8f8c98fc0e7ec986145b9fc757.tar.gz |
Improve error messages
- mysql_install_db now prints position to error file, if log-error is used
- Warning about compatibility now mentions MySQL 5.6 and 5.7
- Give warning if --show_compatibility_56 is used
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 2 | ||||
-rw-r--r-- | scripts/mysql_install_db.sh | 11 | ||||
-rw-r--r-- | sql/mysqld.cc | 9 |
3 files changed, 15 insertions, 7 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 7902c8770a8..ae5d9af30d3 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -4418,7 +4418,7 @@ sub extract_warning_lines ($$) { qr|feedback plugin: failed to retrieve the MAC address|, qr|Plugin 'FEEDBACK' init function returned error|, qr|Plugin 'FEEDBACK' registration as a INFORMATION SCHEMA failed|, - qr|'log-bin-use-v1-row-events' is MySQL 5.6 compatible option|, + qr|'log-bin-use-v1-row-events' is MySQL .* compatible option|, qr|InnoDB: Setting thread \d+ nice to \d+ failed, current nice \d+, errno 13|, # setpriority() fails under valgrind qr|Failed to setup SSL|, qr|SSL error: Failed to set ciphers to use|, diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index 07565f7046d..1777946120d 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -24,6 +24,7 @@ builddir="" ldata="@localstatedir@" langdir="" srcdir="" +log_error="" args="" defaults="" @@ -136,6 +137,8 @@ parse_arguments() --builddir=*) builddir=`parse_arg "$arg"` ;; --srcdir=*) srcdir=`parse_arg "$arg"` ;; --ldata=*|--datadir=*|--data=*) ldata=`parse_arg "$arg"` ;; + --log-error=*) + log_error=`parse_arg "$arg"` ;; --user=*) # Note that the user will be passed to mysqld so that it runs # as 'user' (crucial e.g. if log-bin=/some_other_path/ @@ -147,7 +150,6 @@ parse_arguments() --help) usage ;; --no-defaults|--defaults-file=*|--defaults-extra-file=*) defaults="$arg" ;; - --cross-bootstrap|--windows) # Used when building the MariaDB system tables on a different host than # the target. The platform-independent files that are created in @@ -475,9 +477,14 @@ if { echo "use mysql;$install_params"; cat "$create_system_tables" "$create_syst then s_echo "OK" else + log_file_place=$ldata + if test -n "$log_error" + then + log_file_place="$log_error or $log_file_place" + fi echo echo "Installation of system tables failed! Examine the logs in" - echo "$ldata for more information." + echo "$log_file_place for more information." echo echo "The problem could be conflicting information in an external" echo "my.cnf files. You can ignore these by doing:" diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 2f64d45cb38..4dac2acb5af 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -7759,6 +7759,7 @@ struct my_option my_long_options[]= MYSQL_SUGGEST_ANALOG_OPTION("max-binlog-dump-events", "--debug-max-binlog-dump-events"), MYSQL_SUGGEST_ANALOG_OPTION("sporadic-binlog-dump-fail", "--debug-sporadic-binlog-dump-fail"), MYSQL_COMPATIBILITY_OPTION("new"), + MYSQL_COMPATIBILITY_OPTION("show_compatibility_56"), /* The following options were added after 5.6.10 */ MYSQL_TO_BE_IMPLEMENTED_OPTION("rpl-stop-slave-timeout"), @@ -9044,12 +9045,12 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument) opt->name); break; case OPT_MYSQL_COMPATIBILITY: - sql_print_warning("'%s' is MySQL 5.6 compatible option. Not used or needed " - "in MariaDB.", opt->name); + sql_print_warning("'%s' is MySQL 5.6 / 5.7 compatible option. Not used or " + "needed in MariaDB.", opt->name); break; case OPT_MYSQL_TO_BE_IMPLEMENTED: - sql_print_warning("'%s' is MySQL 5.6 compatible option. To be implemented " - "in later versions.", opt->name); + sql_print_warning("'%s' is MySQL 5.6 / 5.7 compatible option. To be " + "implemented in later versions.", opt->name); break; case 'a': SYSVAR_AUTOSIZE(global_system_variables.sql_mode, MODE_ANSI); |