summaryrefslogtreecommitdiff
path: root/sql/unireg.h
diff options
context:
space:
mode:
authorsasha@mysql.sashanet.com <>2001-05-31 13:56:57 -0600
committersasha@mysql.sashanet.com <>2001-05-31 13:56:57 -0600
commit6d75659b42f137750bac47e43b0f7fa049695094 (patch)
treeb8da1ac8fb4a3e3ad24ad51faa730be16a253d20 /sql/unireg.h
parent49ac18c7c90c0a9fdff3efe50f3b94fdda4db68e (diff)
downloadmariadb-git-6d75659b42f137750bac47e43b0f7fa049695094.tar.gz
deal with errno out of range when reading it from the master
Diffstat (limited to 'sql/unireg.h')
-rw-r--r--sql/unireg.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/unireg.h b/sql/unireg.h
index 7ad3bac2eab..87529dd1f69 100644
--- a/sql/unireg.h
+++ b/sql/unireg.h
@@ -37,7 +37,8 @@
#define SHAREDIR "share/"
#endif
-#define ER(X) errmesg[(X)-1000]
+#define ER(X) ((X) >= 1000 && (X) < ER_ERROR_MESSAGES + 1000) ? \
+ errmesg[(X)-1000] : "Invalid error code"
#define ERRMAPP 1 /* Errormap f|r my_error */
#define LIBLEN FN_REFLEN-FN_LEN /* Max l{ngd p} dev */