summaryrefslogtreecommitdiff
path: root/sql/unireg.h
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2001-06-01 04:10:53 +0300
committermonty@hundin.mysql.fi <>2001-06-01 04:10:53 +0300
commit683a46a38bda21c1fce2504d9b84dd0db2064330 (patch)
treee8c9dcfbc7d121d724841d99ae16959b3c2fb552 /sql/unireg.h
parent7ec2d474ce8652d114de4b08a3ae12c9999d91f0 (diff)
downloadmariadb-git-683a46a38bda21c1fce2504d9b84dd0db2064330.tar.gz
Added ER_SAFE() for cases when the error message could be out of bands
Diffstat (limited to 'sql/unireg.h')
-rw-r--r--sql/unireg.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/unireg.h b/sql/unireg.h
index 87529dd1f69..159832295fd 100644
--- a/sql/unireg.h
+++ b/sql/unireg.h
@@ -37,8 +37,9 @@
#define SHAREDIR "share/"
#endif
-#define ER(X) ((X) >= 1000 && (X) < ER_ERROR_MESSAGES + 1000) ? \
- errmesg[(X)-1000] : "Invalid error code"
+#define ER(X) errmesg[(X)-1000]
+#define ER_SAFE(X) (((X) >= 1000 && (X) < ER_ERROR_MESSAGES + 1000) ? ER(X) : "Invalid error code")
+
#define ERRMAPP 1 /* Errormap f|r my_error */
#define LIBLEN FN_REFLEN-FN_LEN /* Max l{ngd p} dev */