From 8fb2c80fdb9868b45ab91c915b32d2c39fd7fcd0 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Fri, 5 Dec 2014 16:38:48 +0400 Subject: [PATCH] Fixed valgrind warnings in delete_dynamic(). Join_plan_state performs out-of-API initialization of DYNAMIC_ARRAY. This is done to postpone actual array initialization till first use, whilst retaining the right to call delete_dynamic(). Since delete_dynamic() now checks DYNAMIC_ARRAY::malloc_flags it should be initialized it as well. --- sql/sql_select.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/sql_select.h b/sql/sql_select.h index 5e9d570072e..07c0ca88e0f 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -903,6 +903,7 @@ protected: { keyuse.elements= 0; keyuse.buffer= NULL; + keyuse.malloc_flags= 0; best_positions= 0; /* To detect errors */ error= my_multi_malloc(MYF(MY_WME), &best_positions,