diff options
Diffstat (limited to 'mysys/my_error.c')
-rw-r--r-- | mysys/my_error.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mysys/my_error.c b/mysys/my_error.c index 81abbde96df..7f9850ac94d 100644 --- a/mysys/my_error.c +++ b/mysys/my_error.c @@ -19,6 +19,10 @@ #include <stdarg.h> #include <m_ctype.h> +/* Max length of a error message. Should be kept in sync with MYSQL_ERRMSG_SIZE. */ +#define ERRMSGSIZE (512) + + /* Define some external variables for error handling */ /* @@ -30,8 +34,6 @@ my_printf_error(ER_CODE, format, MYF(N), ...) */ -char NEAR errbuff[NRERRBUFFS][ERRMSGSIZE]; - /* Message texts are registered into a linked list of 'my_err_head' structs. Each struct contains (1.) an array of pointers to C character strings with @@ -75,7 +77,7 @@ int my_error(int nr, myf MyFlags, ...) const char *format; struct my_err_head *meh_p; va_list args; - char ebuff[ERRMSGSIZE + 20]; + char ebuff[ERRMSGSIZE]; DBUG_ENTER("my_error"); DBUG_PRINT("my", ("nr: %d MyFlags: %d errno: %d", nr, MyFlags, errno)); @@ -112,7 +114,7 @@ int my_error(int nr, myf MyFlags, ...) int my_printf_error(uint error, const char *format, myf MyFlags, ...) { va_list args; - char ebuff[ERRMSGSIZE+20]; + char ebuff[ERRMSGSIZE]; DBUG_ENTER("my_printf_error"); DBUG_PRINT("my", ("nr: %d MyFlags: %d errno: %d format: %s", error, MyFlags, errno, format)); |