List:Commits« Previous MessageNext Message »
From:Evgeny Potemkin Date:February 25 2011 1:48pm
Subject:bzr commit into mysql-trunk branch (epotemkin:3007) Bug#11808582 WL#5274
View as plain text  
#At file:///work/bzrroot/wl5274-next-mr-bugfixing/ based on revid:epotemkin@stripped

 3007 Evgeny Potemkin	2011-02-25
      Bug#11808582: VALGRIND ON WL#5274: INVALID WRITE IN MC_REPLACE_STRMEM.C:493) 
      TABLE_SHARE::column_bitmap_size wasn't initialized for tmp tables. This
      caused valgrind to throw a warning.
      Now setup_tmp_table_column_bitmaps initializes TABLE_SHARE::column_bitmap_size.
     @ mysql-test/r/derived.result
        Added a test case for the bug#11808582.
     @ mysql-test/t/derived.test
        Added a test case for the bug#11808582.
     @ sql/sql_select.cc
        Bug#11808582: VALGRIND ON WL#5274: INVALID WRITE IN MC_REPLACE_STRMEM.C:493) 
        Now setup_tmp_table_column_bitmaps initializes TABLE_SHARE::column_bitmap_size.

    modified:
      mysql-test/r/derived.result
      mysql-test/t/derived.test
      sql/sql_select.cc
=== modified file 'mysql-test/r/derived.result'
--- a/mysql-test/r/derived.result	2011-02-25 11:10:05 +0000
+++ b/mysql-test/r/derived.result	2011-02-25 13:48:31 +0000
@@ -1576,3 +1576,25 @@ FROM  CC AS C_SQ1_alias1
 field1
 DROP TABLE CC;
 #
+#
+# Bug#11808582: VALGRIND ON WL#5274: INVALID WRITE IN MC_REPLACE_STRMEM.C:493) 
+#
+CREATE TABLE CC (
+pk INT NOT NULL AUTO_INCREMENT,
+col_int_key INT,
+col_time_key time,
+col_varchar_key VARCHAR(1),
+PRIMARY KEY (pk),
+KEY col_int_key (col_int_key),
+KEY col_varchar_key (col_varchar_key,col_int_key)
+);
+SELECT alias1.col_time_key AS field1
+FROM ( ( SELECT SQ1_alias1.* FROM CC AS SQ1_alias1 ) AS alias1
+INNER JOIN CC AS alias2
+ON (alias2.col_int_key = alias1.col_int_key)
+)
+WHERE alias1.col_int_key = 207
+ORDER BY alias1.col_varchar_key, alias1.pk ASC, field1;
+field1
+DROP TABLE CC;
+#

=== modified file 'mysql-test/t/derived.test'
--- a/mysql-test/t/derived.test	2011-02-25 11:10:05 +0000
+++ b/mysql-test/t/derived.test	2011-02-25 13:48:31 +0000
@@ -936,3 +936,26 @@ FROM  (
 DROP TABLE CC;
 --echo #
 
+--echo #
+--echo # Bug#11808582: VALGRIND ON WL#5274: INVALID WRITE IN MC_REPLACE_STRMEM.C:493) 
+--echo #
+CREATE TABLE CC (
+  pk INT NOT NULL AUTO_INCREMENT,
+  col_int_key INT,
+  col_time_key time,
+  col_varchar_key VARCHAR(1),
+  PRIMARY KEY (pk),
+  KEY col_int_key (col_int_key),
+  KEY col_varchar_key (col_varchar_key,col_int_key)
+);
+SELECT alias1.col_time_key AS field1
+FROM ( ( SELECT SQ1_alias1.* FROM CC AS SQ1_alias1 ) AS alias1
+  INNER JOIN CC AS alias2
+  ON (alias2.col_int_key = alias1.col_int_key)
+  )
+WHERE alias1.col_int_key = 207
+ORDER BY alias1.col_varchar_key, alias1.pk ASC, field1;
+
+DROP TABLE CC;
+--echo #
+

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2011-02-25 11:10:05 +0000
+++ b/sql/sql_select.cc	2011-02-25 13:48:31 +0000
@@ -15398,6 +15398,7 @@ void setup_tmp_table_column_bitmaps(TABL
   table->s->all_set= table->def_read_set;
   bitmap_set_all(&table->s->all_set);
   table->default_column_bitmaps();
+  table->s->column_bitmap_size= bitmap_buffer_size(field_count);
 }
 
 


Attachment: [text/bzr-bundle] bzr/epotemkin@mysql.com-20110225134831-5hsvyzt4yluf8tgf.bundle
Thread
bzr commit into mysql-trunk branch (epotemkin:3007) Bug#11808582 WL#5274Evgeny Potemkin25 Feb
  • Re: bzr commit into mysql-trunk branch (epotemkin:3007) Bug#11808582WL#5274Øystein Grøvlen15 Mar
    • Re: bzr commit into mysql-trunk branch (epotemkin:3007) Bug#11808582WL#5274Øystein Grøvlen18 Mar
      • Re: bzr commit into mysql-trunk branch (epotemkin:3007) Bug#11808582WL#5274Øystein Grøvlen21 Mar