From: Date: December 27 2008 2:34am Subject: bzr push into mysql-6.0-opt-subqueries branch (sergefp:2750 to 2751) Bug#41759 List-Archive: http://lists.mysql.com/commits/62356 X-Bug: 41759 Message-Id: <20081227013420.5981C15A263@pslp2.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT 2751 Sergey Petrunia 2008-12-27 BUG#41759: Valgrind warning: Invalid read of size 1 open_tables() with ps-protocol - In open_tables(): Don't try accessing tables->table_name before is guaranteed to have a valid value (see the code between the two locations for code and comments about when the table may not have a valid name when passed to open_tables). modified: sql/sql_base.cc 2750 Sergey Petrunia 2008-12-24 [merge] Merge mysql-6.0 -> mysql-6.0-opt-subqueries modified: configure.in === modified file 'sql/sql_base.cc' --- a/sql/sql_base.cc 2008-12-14 11:36:15 +0000 +++ b/sql/sql_base.cc 2008-12-27 01:32:33 +0000 @@ -3644,9 +3644,6 @@ int open_tables(THD *thd, TABLE_LIST **s */ for (tables= *start; tables ;tables= tables->next_global) { - DBUG_PRINT("tcache", ("opening table: '%s'.'%s' item: %p", - tables->db, tables->table_name, tables)); - safe_to_ignore_table= FALSE; /* @@ -3692,6 +3689,8 @@ int open_tables(THD *thd, TABLE_LIST **s } DBUG_RETURN(-1); } + DBUG_PRINT("tcache", ("opening table: '%s'.'%s' item: %p", + tables->db, tables->table_name, tables)); //psergey: invalid read of size 1 here (*counter)++; /* Not a placeholder: must be a base table or a view. Let us open it. */