From 8dc7c505a3ff39239d01acd6c0d0b8e923309d2e Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Mon, 10 Dec 2012 09:55:08 +0100 Subject: [PATCH] Bug#15960005 VALGRIND WARNINGS IN PROCESS_ARGS Both and can be specified as numbers or '*'. If an asterisk is used, an argument of type int is consumed. --- include/mysql/service_my_snprintf.h | 1 + strings/my_vsnprintf.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/mysql/service_my_snprintf.h b/include/mysql/service_my_snprintf.h index fd55944ed67..c7a03893d2e 100644 --- a/include/mysql/service_my_snprintf.h +++ b/include/mysql/service_my_snprintf.h @@ -49,6 +49,7 @@ string will be quoted according to MySQL identifier quoting rules. Both and can be specified as numbers or '*'. + If an asterisk is used, an argument of type int is consumed. can be 'l', 'll', or 'z'. diff --git a/strings/my_vsnprintf.c b/strings/my_vsnprintf.c index 73cbf02f148..b0fd83451a6 100644 --- a/strings/my_vsnprintf.c +++ b/strings/my_vsnprintf.c @@ -343,6 +343,7 @@ start: print_arr[idx].length--; DBUG_ASSERT(*fmt == '$' && print_arr[idx].length < MAX_ARGS); args_arr[print_arr[idx].length].arg_type= 'd'; + args_arr[print_arr[idx].length].have_longlong= 0; print_arr[idx].flags|= LENGTH_ARG; arg_count= max(arg_count, print_arr[idx].length + 1); fmt++; @@ -361,6 +362,7 @@ start: print_arr[idx].width--; DBUG_ASSERT(*fmt == '$' && print_arr[idx].width < MAX_ARGS); args_arr[print_arr[idx].width].arg_type= 'd'; + args_arr[print_arr[idx].width].have_longlong= 0; print_arr[idx].flags|= WIDTH_ARG; arg_count= max(arg_count, print_arr[idx].width + 1); fmt++;