summaryrefslogtreecommitdiff
path: root/sql/sys_vars.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-09-22 15:30:24 +0300
committerMichael Widenius <monty@askmonty.org>2012-09-22 15:30:24 +0300
commit3e83c4e8f90851040be921443b52144a2862444a (patch)
treef76ee35018c73f2034e0e6e42c89c038f920f495 /sql/sys_vars.cc
parent513923868545338c00390f35f63b92efd55f50bb (diff)
parent79feec77ed4a7121e68be1dc16f79dcad6c5d25e (diff)
downloadmariadb-git-3e83c4e8f90851040be921443b52144a2862444a.tar.gz
Automatic merge
Diffstat (limited to 'sql/sys_vars.cc')
-rw-r--r--sql/sys_vars.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index fe48f953c28..4a003a89a7e 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -3578,22 +3578,25 @@ static bool check_locale(sys_var *self, THD *thd, set_var *var)
if (!locale->errmsgs->errmsgs)
{
+ bool res;
mysql_mutex_lock(&LOCK_error_messages);
- if (!locale->errmsgs->errmsgs &&
- read_texts(ERRMSG_FILE, locale->errmsgs->language,
- &locale->errmsgs->errmsgs,
- ER_ERROR_LAST - ER_ERROR_FIRST + 1))
+ res= (!locale->errmsgs->errmsgs &&
+ read_texts(ERRMSG_FILE, locale->errmsgs->language,
+ &locale->errmsgs->errmsgs,
+ ER_ERROR_LAST - ER_ERROR_FIRST + 1));
+ mysql_mutex_unlock(&LOCK_error_messages);
+ if (res)
{
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
"Can't process error message file for locale '%s'",
locale->name);
- mysql_mutex_unlock(&LOCK_error_messages);
return true;
}
- mysql_mutex_unlock(&LOCK_error_messages);
}
+ status_var_increment(thd->status_var.feature_locale);
return false;
}
+
static Sys_var_struct Sys_lc_messages(
"lc_messages", "Set the language used for the error messages",
SESSION_VAR(lc_messages), NO_CMD_LINE,