summaryrefslogtreecommitdiff
path: root/mysys/my_error.c
diff options
context:
space:
mode:
authorGuilhem Bichot <guilhem@mysql.com>2009-03-11 16:32:42 +0100
committerGuilhem Bichot <guilhem@mysql.com>2009-03-11 16:32:42 +0100
commitb0fcbc84ef609b1147c3624e90fe3dac66ef8c1d (patch)
treeee09976ab4dd9dee924a4c7e30eb0fc9f5e7d63f /mysys/my_error.c
parenta15d25f07e56cbd80aecbeadef635d3b55e00e85 (diff)
parent11570d64fcffa66feaf1fdb8072fdfb9dbd865ca (diff)
downloadmariadb-git-b0fcbc84ef609b1147c3624e90fe3dac66ef8c1d.tar.gz
merge of 5.1-main into 5.1-maria; MyISAM changes are also ported to Maria.
Diffstat (limited to 'mysys/my_error.c')
-rw-r--r--mysys/my_error.c10
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));