From: Sergey Petrunia Date: December 27 2008 1:32am Subject: bzr commit into mysql-6.0-opt-subqueries branch (sergefp:2751) Bug#41759 List-Archive: http://lists.mysql.com/commits/62355 X-Bug: 41759 Message-Id: <20081227013249.5E96F2EA00E@pslp2.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT #At file:///home/spetrunia/dev/mysql-6.0-subq-r20-vg/ based on revid:sergefp@stripped 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 per-file messages: sql/sql_base.cc BUG#41759: Valgrind warning: Invalid read of size 1 open_tables() with ps-protocol - In open_tables(): Don't try accessing table_name before we're sure it has valid value. === 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. */