From 7a9a3a79e9c9b60d67c1c3c081ed8dbd23a6fc4b Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Sun, 27 Jun 2010 00:55:40 +0400 Subject: [PATCH] Fix valgrind failure: when creating key image, don't try to copy out more than field->pack_length() bytes. --- sql/tztime.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/tztime.cc b/sql/tztime.cc index 457bbeec676..ee151b1e515 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -1892,7 +1892,7 @@ tz_load_from_open_tables(const String *tz_name, TABLE_LIST *tz_tables) table= tz_tables->table; tz_tables= tz_tables->next_local; table->field[0]->store((longlong) tzid, TRUE); - table->field[0]->get_key_image(keybuff, sizeof(keybuff), Field::itRAW); + table->field[0]->get_key_image(keybuff, table->field[0]->pack_length(), Field::itRAW); (void)table->file->ha_index_init(0, 1); if (table->file->ha_index_read_map(table->record[0], keybuff,