diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-06-03 09:55:08 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-06-03 09:55:08 +0200 |
commit | 5d16592d44d8dd7147ee868c661af842ec0f1568 (patch) | |
tree | 57f83c95bf23bdb90bd05e1134ffaaa0e015249f /include | |
parent | 2d687cad5d1154418603a16e58772d91f37d4cbd (diff) | |
parent | c1fd09f3d4848ae59605564ded9628307d59dd27 (diff) | |
download | mariadb-git-5d16592d44d8dd7147ee868c661af842ec0f1568.tar.gz |
mysql-5.5.38 merge
Diffstat (limited to 'include')
-rw-r--r-- | include/errmsg.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/errmsg.h b/include/errmsg.h index 64ec2df395c..5655883466c 100644 --- a/include/errmsg.h +++ b/include/errmsg.h @@ -1,7 +1,7 @@ #ifndef ERRMSG_INCLUDED #define ERRMSG_INCLUDED -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2014, 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 @@ -32,7 +32,9 @@ extern const char *client_errors[]; /* Error messages */ #define CR_MIN_ERROR 2000 /* For easier client code */ #define CR_MAX_ERROR 2999 #if !defined(ER) -#define ER(X) client_errors[(X)-CR_MIN_ERROR] +#define ER(X) (((X) >= CR_ERROR_FIRST && (X) <= CR_ERROR_LAST)? \ + client_errors[(X)-CR_ERROR_FIRST]: client_errors[CR_UNKNOWN_ERROR]) + #endif #define CLIENT_ERRMAP 2 /* Errormap used by my_error() */ |