summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbar@bar.intranet.mysql.r18.ru <>2003-12-24 16:04:25 +0400
committerbar@bar.intranet.mysql.r18.ru <>2003-12-24 16:04:25 +0400
commit807b88505d4bb1e0c35c3c162ba607ee465c1d11 (patch)
tree50daadcb17d6fdea20393609e318bd007e2fb884
parent9db115c0271220d283c4683558b87f5af7bc1ef6 (diff)
downloadmariadb-git-807b88505d4bb1e0c35c3c162ba607ee465c1d11.tar.gz
install_test_db.sh:
install-test-db did not substiture the path to charsets file, so tests failed with non-default collation incompiled, for example --with-collation=latin1_german1_ci mysqld.cc: better error messaging
-rw-r--r--mysql-test/install_test_db.sh2
-rw-r--r--sql/mysqld.cc8
2 files changed, 7 insertions, 3 deletions
diff --git a/mysql-test/install_test_db.sh b/mysql-test/install_test_db.sh
index d8bdd91c59f..11ed1bb312c 100644
--- a/mysql-test/install_test_db.sh
+++ b/mysql-test/install_test_db.sh
@@ -66,7 +66,7 @@ if [ x$BINARY_DIST = x1 ] ; then
basedir=..
else
basedir=.
-EXTRA_ARG="--language=../sql/share/english/"
+EXTRA_ARG="--language=../sql/share/english/ --character-sets-dir=../sql/share/charsets/"
fi
mysqld_boot=" $execdir/mysqld --no-defaults --bootstrap --skip-grant-tables \
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index bf57f9fb8f4..e81113f6111 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -2148,8 +2148,12 @@ static int init_common_variables(const char *conf_file_name, int argc,
{
CHARSET_INFO *default_collation;
default_collation= get_charset_by_name(default_collation_name, MYF(0));
- if (!default_collation || !my_charset_same(default_charset_info,
- default_collation))
+ if (!default_collation)
+ {
+ sql_print_error(ER(ER_UNKNOWN_COLLATION), default_collation_name);
+ return 1;
+ }
+ if (!my_charset_same(default_charset_info, default_collation))
{
sql_print_error(ER(ER_COLLATION_CHARSET_MISMATCH),
default_collation_name,