List:Commits« Previous MessageNext Message »
From:Marc Alff Date:November 5 2011 12:40pm
Subject:bzr push into mysql-trunk-pfs-tuning branch (marc.alff:3433 to 3435)
View as plain text  
 3435 Marc Alff	2011-11-05 [merge]
      Merge mysql-trunk --> mysql-trunk-pfs-tuning

    modified:
      mysql-test/include/join_cache.inc
      mysql-test/r/join_cache_bka.result
      mysql-test/r/join_cache_bka_nixbnl.result
      mysql-test/r/join_cache_bkaunique.result
      mysql-test/r/join_cache_bnl.result
      mysql-test/r/join_cache_nojb.result
      mysql-test/valgrind.supp
      sql/field.h
      sql/field_conv.cc
      sql/sql_select.cc
 3434 Marc Alff	2011-11-05
      Fixed build break

    modified:
      mysys/psi_noop.c
 3433 Marc Alff	2011-11-04
      Performance tuning, continued

    modified:
      include/mysql/psi/psi.h
      sql/sql_class.h
      storage/innobase/include/os0sync.ic
      storage/innobase/include/sync0rw.ic
      storage/innobase/include/sync0sync.ic
      storage/perfschema/pfs.cc
      storage/perfschema/unittest/pfs_benchmark-t.cc
=== modified file 'mysql-test/include/join_cache.inc'
--- a/mysql-test/include/join_cache.inc	2011-08-08 14:16:20 +0000
+++ b/mysql-test/include/join_cache.inc	2011-11-04 15:20:13 +0000
@@ -1961,3 +1961,26 @@ eval EXPLAIN $query;
 eval $query;
 
 DROP TABLE t1, t2, t3, t4;
+
+--echo #
+--echo # Bug#12997905: VALGRIND: SYSCALL PARAM PWRITE64(BUF) 
+--echo #               POINTS TO UNINITIALISED BYTE(S)
+--echo #
+
+CREATE TABLE t1 (
+  col1 varchar(10),
+  col2 varchar(1024)
+) ENGINE=innodb;
+
+INSERT INTO t1 VALUES ('a','a');
+
+CREATE TABLE t2 (i varchar(10)) ENGINE=innodb;
+INSERT INTO t2 VALUES ('a');
+
+SELECT t1.col1
+FROM t1 JOIN t2 ON t1.col1 = t2.i 
+GROUP BY t1.col2;
+
+DROP TABLE t1,t2;
+
+--echo # End of Bug#12997905

=== modified file 'mysql-test/r/join_cache_bka.result'
--- a/mysql-test/r/join_cache_bka.result	2011-10-27 08:52:27 +0000
+++ b/mysql-test/r/join_cache_bka.result	2011-11-04 15:20:13 +0000
@@ -2681,4 +2681,22 @@ col_int
 NULL
 NULL
 DROP TABLE t1, t2, t3, t4;
+#
+# Bug#12997905: VALGRIND: SYSCALL PARAM PWRITE64(BUF) 
+#               POINTS TO UNINITIALISED BYTE(S)
+#
+CREATE TABLE t1 (
+col1 varchar(10),
+col2 varchar(1024)
+) ENGINE=innodb;
+INSERT INTO t1 VALUES ('a','a');
+CREATE TABLE t2 (i varchar(10)) ENGINE=innodb;
+INSERT INTO t2 VALUES ('a');
+SELECT t1.col1
+FROM t1 JOIN t2 ON t1.col1 = t2.i 
+GROUP BY t1.col2;
+col1
+a
+DROP TABLE t1,t2;
+# End of Bug#12997905
 set optimizer_switch = default;

=== modified file 'mysql-test/r/join_cache_bka_nixbnl.result'
--- a/mysql-test/r/join_cache_bka_nixbnl.result	2011-10-27 08:52:27 +0000
+++ b/mysql-test/r/join_cache_bka_nixbnl.result	2011-11-04 15:20:13 +0000
@@ -2681,4 +2681,22 @@ col_int
 NULL
 NULL
 DROP TABLE t1, t2, t3, t4;
+#
+# Bug#12997905: VALGRIND: SYSCALL PARAM PWRITE64(BUF) 
+#               POINTS TO UNINITIALISED BYTE(S)
+#
+CREATE TABLE t1 (
+col1 varchar(10),
+col2 varchar(1024)
+) ENGINE=innodb;
+INSERT INTO t1 VALUES ('a','a');
+CREATE TABLE t2 (i varchar(10)) ENGINE=innodb;
+INSERT INTO t2 VALUES ('a');
+SELECT t1.col1
+FROM t1 JOIN t2 ON t1.col1 = t2.i 
+GROUP BY t1.col2;
+col1
+a
+DROP TABLE t1,t2;
+# End of Bug#12997905
 set optimizer_switch = default;

=== modified file 'mysql-test/r/join_cache_bkaunique.result'
--- a/mysql-test/r/join_cache_bkaunique.result	2011-10-27 08:52:27 +0000
+++ b/mysql-test/r/join_cache_bkaunique.result	2011-11-04 15:20:13 +0000
@@ -2682,4 +2682,22 @@ col_int
 NULL
 NULL
 DROP TABLE t1, t2, t3, t4;
+#
+# Bug#12997905: VALGRIND: SYSCALL PARAM PWRITE64(BUF) 
+#               POINTS TO UNINITIALISED BYTE(S)
+#
+CREATE TABLE t1 (
+col1 varchar(10),
+col2 varchar(1024)
+) ENGINE=innodb;
+INSERT INTO t1 VALUES ('a','a');
+CREATE TABLE t2 (i varchar(10)) ENGINE=innodb;
+INSERT INTO t2 VALUES ('a');
+SELECT t1.col1
+FROM t1 JOIN t2 ON t1.col1 = t2.i 
+GROUP BY t1.col2;
+col1
+a
+DROP TABLE t1,t2;
+# End of Bug#12997905
 set optimizer_switch = default;

=== modified file 'mysql-test/r/join_cache_bnl.result'
--- a/mysql-test/r/join_cache_bnl.result	2011-10-27 08:52:27 +0000
+++ b/mysql-test/r/join_cache_bnl.result	2011-11-04 15:20:13 +0000
@@ -2682,4 +2682,22 @@ col_int
 NULL
 NULL
 DROP TABLE t1, t2, t3, t4;
+#
+# Bug#12997905: VALGRIND: SYSCALL PARAM PWRITE64(BUF) 
+#               POINTS TO UNINITIALISED BYTE(S)
+#
+CREATE TABLE t1 (
+col1 varchar(10),
+col2 varchar(1024)
+) ENGINE=innodb;
+INSERT INTO t1 VALUES ('a','a');
+CREATE TABLE t2 (i varchar(10)) ENGINE=innodb;
+INSERT INTO t2 VALUES ('a');
+SELECT t1.col1
+FROM t1 JOIN t2 ON t1.col1 = t2.i 
+GROUP BY t1.col2;
+col1
+a
+DROP TABLE t1,t2;
+# End of Bug#12997905
 set optimizer_switch = default;

=== modified file 'mysql-test/r/join_cache_nojb.result'
--- a/mysql-test/r/join_cache_nojb.result	2011-10-27 08:52:27 +0000
+++ b/mysql-test/r/join_cache_nojb.result	2011-11-04 15:20:13 +0000
@@ -2682,4 +2682,22 @@ NULL
 3
 NULL
 DROP TABLE t1, t2, t3, t4;
+#
+# Bug#12997905: VALGRIND: SYSCALL PARAM PWRITE64(BUF) 
+#               POINTS TO UNINITIALISED BYTE(S)
+#
+CREATE TABLE t1 (
+col1 varchar(10),
+col2 varchar(1024)
+) ENGINE=innodb;
+INSERT INTO t1 VALUES ('a','a');
+CREATE TABLE t2 (i varchar(10)) ENGINE=innodb;
+INSERT INTO t2 VALUES ('a');
+SELECT t1.col1
+FROM t1 JOIN t2 ON t1.col1 = t2.i 
+GROUP BY t1.col2;
+col1
+a
+DROP TABLE t1,t2;
+# End of Bug#12997905
 set optimizer_switch = default;

=== modified file 'mysql-test/valgrind.supp'
--- a/mysql-test/valgrind.supp	2011-10-07 06:03:14 +0000
+++ b/mysql-test/valgrind.supp	2011-11-04 15:22:50 +0000
@@ -1023,35 +1023,3 @@
    fun:_Z*10write_keysP10Sort_paramPPhjP11st_io_cacheS4_
    fun:_Z8filesortP3THDP5TABLEP13st_sort_fieldjP10SQL_SELECTybPyS7_
 }
-
-# Syscall param write(buf) points to uninitialised byte(s)
-# The '...' wildcard is for 'fun:inline_mysql_file_write' which *may*
-# be inlined.
-{
-   Bug#12879084 VALGRIND FAILURE IN INNODB.INNODB_BUFFER_POOL_LOAD / one
-   Memcheck:Param
-   write(buf)
-   obj:*/libpthread*.so
-   fun:my_write
-   ...
-   fun:my_b_flush_io_cache
-   fun:end_io_cache
-   fun:mi_extra
-   fun:_ZN9ha_myisam5extraE17ha_extra_function
-}
-
-{
-   Bug#12879084 VALGRIND FAILURE IN INNODB.INNODB_BUFFER_POOL_LOAD / two
-   Memcheck:Param
-   write(buf)
-   obj:*/libpthread*.so
-   fun:my_write
-   fun:my_b_flush_io_cache
-   fun:_my_b_write
-   fun:_mi_write_part_record
-   fun:write_dynamic_record
-   fun:_mi_write_blob_record
-   fun:mi_write
-   fun:_ZN9ha_myisam9write_rowEPh
-   fun:_ZN7handler12ha_write_rowEPh
-}

=== modified file 'mysys/psi_noop.c'
--- a/mysys/psi_noop.c	2011-11-04 16:34:00 +0000
+++ b/mysys/psi_noop.c	2011-11-05 12:22:44 +0000
@@ -575,7 +575,7 @@ start_socket_wait_noop(PSI_socket_locker
                        const char *src_file NNN,
                        uint src_line NNN)
 {
-  return;
+  return NULL;
 }
 
 static void end_socket_wait_noop(PSI_socket_locker *locker NNN,

=== modified file 'sql/field.h'
--- a/sql/field.h	2011-10-11 04:27:52 +0000
+++ b/sql/field.h	2011-11-04 15:20:13 +0000
@@ -2454,6 +2454,23 @@ public:
   uchar *from_null_ptr,*to_null_ptr;
   my_bool *null_row;
   uint	from_bit,to_bit;
+  /**
+    Number of bytes in the fields pointed to by 'from_ptr' and
+    'to_ptr'. Usually this is the number of bytes that are copied from
+    'from_ptr' to 'to_ptr'.
+
+    For variable-length fields (VARCHAR), the first byte(s) describe
+    the actual length of the text. For VARCHARs with length 
+       < 256 there is 1 length byte 
+       >= 256 there is 2 length bytes
+    Thus, if from_field is VARCHAR(10), from_length (and in most cases
+    to_length) is 11. For VARCHAR(1024), the length is 1026. @see
+    Field_varstring::length_bytes
+
+    Note that for VARCHARs, do_copy() will be do_varstring*() which
+    only copies the length-bytes (1 or 2) + the actual length of the
+    text instead of from/to_length bytes. @see get_copy_func()
+  */
   uint from_length,to_length;
   Field *from_field,*to_field;
   String tmp;					// For items

=== modified file 'sql/field_conv.cc'
--- a/sql/field_conv.cc	2011-07-28 10:54:44 +0000
+++ b/sql/field_conv.cc	2011-11-04 15:20:13 +0000
@@ -709,7 +709,7 @@ Copy_field::get_copy_func(Field *to,Fiel
         if (((Field_varstring*) to)->length_bytes !=
             ((Field_varstring*) from)->length_bytes)
           return do_field_string;
-        if (to_length != from_length)
+        else
           return (((Field_varstring*) to)->length_bytes == 1 ?
                   (from->charset()->mbmaxlen == 1 ? do_varstring1 :
                                                     do_varstring1_mb) :

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2011-11-03 16:03:34 +0000
+++ b/sql/sql_select.cc	2011-11-04 15:20:13 +0000
@@ -18468,6 +18468,8 @@ bool instantiate_tmp_table(TABLE *table,
     if (create_myisam_tmp_table(table, keyinfo, start_recinfo, recinfo,
                                 options, big_tables))
       return TRUE;
+    // Make empty record so random data is not written to disk
+    empty_record(table);
   }
   if (open_tmp_table(table))
     return TRUE;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-pfs-tuning branch (marc.alff:3433 to 3435) Marc Alff7 Nov