diff options
author | Guilhem Bichot <guilhem.bichot@oracle.com> | 2011-05-21 10:21:08 +0200 |
---|---|---|
committer | Guilhem Bichot <guilhem.bichot@oracle.com> | 2011-05-21 10:21:08 +0200 |
commit | 3ceec2f19cff22d7b6078b6a8d5788fa19264b8a (patch) | |
tree | 43fd6afdae9f8879ad4cdbb000497fee7cba02f4 /sql/derror.cc | |
parent | 955cb796e7672d1186f44de84528b7b8fe47f0c9 (diff) | |
parent | 12c42b980aa94105a9108d4f58c5dc75d96ec824 (diff) | |
download | mariadb-git-3ceec2f19cff22d7b6078b6a8d5788fa19264b8a.tar.gz |
Merge from 5.1.
Diffstat (limited to 'sql/derror.cc')
-rw-r--r-- | sql/derror.cc | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/sql/derror.cc b/sql/derror.cc index db9cd3c0c58..2b4cc13073e 100644 --- a/sql/derror.cc +++ b/sql/derror.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2005 MySQL AB, 2008-2009 Sun Microsystems, Inc +/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -11,8 +11,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** @file @@ -108,7 +107,6 @@ bool read_texts(const char *file_name, const char *language, char lang_path[FN_REFLEN]; uchar *buff; uchar head[32],*pos; - const char *errmsg; DBUG_ENTER("read_texts"); LINT_INIT(buff); @@ -185,18 +183,9 @@ Check that the above file is the right version for this program!", DBUG_RETURN(0); err: - switch (funktpos) { - case 2: - errmsg= "Not enough memory for messagefile '%s'"; - break; - case 1: - errmsg= "Can't read from messagefile '%s'"; - break; - default: - errmsg= "Can't find messagefile '%s'"; - break; - } - sql_print_error(errmsg, name); + sql_print_error((funktpos == 2) ? "Not enough memory for messagefile '%s'" : + ((funktpos == 1) ? "Can't read from messagefile '%s'" : + "Can't find messagefile '%s'"), name); if (file != FERR) (void) mysql_file_close(file, MYF(MY_WME)); DBUG_RETURN(1); |