diff options
author | unknown <sasha@mysql.sashanet.com> | 2001-05-31 13:56:57 -0600 |
---|---|---|
committer | unknown <sasha@mysql.sashanet.com> | 2001-05-31 13:56:57 -0600 |
commit | 18da1d3f31c98404b57a653bf593857169835c3c (patch) | |
tree | b8da1ac8fb4a3e3ad24ad51faa730be16a253d20 /sql/unireg.h | |
parent | 714640bfb9f725f05567c58fac34612e3e99df33 (diff) | |
download | mariadb-git-18da1d3f31c98404b57a653bf593857169835c3c.tar.gz |
deal with errno out of range when reading it from the master
sql/slave.cc:
print expected error number
sql/unireg.h:
sanity check for errno range in ER(X)
Diffstat (limited to 'sql/unireg.h')
-rw-r--r-- | sql/unireg.h | 3 |
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 */ |