Commit 8f957e6a authored by monty@narttu.mysql.fi's avatar monty@narttu.mysql.fi

Merge narttu.mysql.fi:/my/mysql-3.23 into narttu.mysql.fi:/my/mysql-4.0

parents 618857b6 e96c75fe
...@@ -23,11 +23,15 @@ ...@@ -23,11 +23,15 @@
int my_snprintf(char* to, size_t n, const char* fmt, ...) int my_snprintf(char* to, size_t n, const char* fmt, ...)
{ {
int result;
va_list args; va_list args;
va_start(args,fmt); va_start(args,fmt);
return my_vsnprintf(to, n, fmt, args); result= my_vsnprintf(to, n, fmt, args);
va_end(args);
return result;
} }
int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap) int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap)
{ {
char *start=to, *end=to+n-1; char *start=to, *end=to+n-1;
...@@ -79,6 +83,7 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap) ...@@ -79,6 +83,7 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap)
return (uint) (to - start); return (uint) (to - start);
} }
#ifdef MAIN #ifdef MAIN
#define OVERRUN_SENTRY 250 #define OVERRUN_SENTRY 250
static void my_printf(const char * fmt, ...) static void my_printf(const char * fmt, ...)
...@@ -99,6 +104,7 @@ static void my_printf(const char * fmt, ...) ...@@ -99,6 +104,7 @@ static void my_printf(const char * fmt, ...)
va_end(ar); va_end(ar);
} }
int main() int main()
{ {
......
...@@ -1037,7 +1037,7 @@ int ha_myisam::create(const char *name, register TABLE *table_arg, ...@@ -1037,7 +1037,7 @@ int ha_myisam::create(const char *name, register TABLE *table_arg,
&keydef, table_arg->keys*sizeof(MI_KEYDEF), &keydef, table_arg->keys*sizeof(MI_KEYDEF),
&keyseg, &keyseg,
((table_arg->key_parts + table_arg->keys) * sizeof(MI_KEYSEG)), ((table_arg->key_parts + table_arg->keys) * sizeof(MI_KEYSEG)),
0))) NullS)))
DBUG_RETURN(1); DBUG_RETURN(1);
pos=table_arg->key_info; pos=table_arg->key_info;
......
...@@ -1560,6 +1560,7 @@ void sql_print_error(const char *format,...) ...@@ -1560,6 +1560,7 @@ void sql_print_error(const char *format,...)
char buff[1024]; char buff[1024];
my_vsnprintf(buff,sizeof(buff)-1,format,args); my_vsnprintf(buff,sizeof(buff)-1,format,args);
DBUG_PRINT("error",("%s",buff)); DBUG_PRINT("error",("%s",buff));
va_end(args);
va_start(args,format); va_start(args,format);
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment