List:Commits« Previous MessageNext Message »
From:marko.makela Date:February 15 2011 9:52am
Subject:bzr commit into mysql-trunk-innodb branch (marko.makela:3500)
View as plain text  
#At file:///home/marko/innobase/dev/mysql2a/5.6-innodb/ based on revid:jimmy.yang@strippedjwj3912vgs

 3500 Marko Mäkelä	2011-02-15 [merge]
      Merge mysql-5.5-innodb to mysql-trunk-innodb.

    added:
      mysql-test/suite/innodb/r/innodb_bug59307.result
      mysql-test/suite/innodb/t/innodb_bug59307.test
    modified:
      storage/innobase/include/sync0rw.ic
      storage/innobase/sync/sync0rw.c
=== added file 'mysql-test/suite/innodb/r/innodb_bug59307.result'
--- a/mysql-test/suite/innodb/r/innodb_bug59307.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/r/innodb_bug59307.result	revid:marko.makela@stripped1sqngq470f2
@@ -0,0 +1,28 @@
+CREATE TABLE t1 (
+t1_int INT,
+t1_time TIME
+) ENGINE=innodb;
+CREATE TABLE t2 (
+t2_int int PRIMARY KEY,
+t2_int2 INT
+) ENGINE=INNODB;
+INSERT INTO t2 VALUES ();
+Warnings:
+Warning	1364	Field 't2_int' doesn't have a default value
+INSERT INTO t1 VALUES ();
+SELECT *
+FROM t1 AS t1a
+WHERE NOT EXISTS
+(SELECT *
+FROM t1 AS t1b
+WHERE t1b.t1_int NOT IN
+(SELECT t2.t2_int
+FROM t2
+WHERE t1b.t1_time LIKE t1b.t1_int
+OR t1b.t1_time <> t2.t2_int2
+AND 6=7
+)
+)
+;
+t1_int	t1_time
+DROP TABLE t1,t2;

=== added file 'mysql-test/suite/innodb/t/innodb_bug59307.test'
--- a/mysql-test/suite/innodb/t/innodb_bug59307.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/t/innodb_bug59307.test	revid:marko.makela@stripped
@@ -0,0 +1,32 @@
+-- source include/have_innodb.inc
+# Bug #59307 uninitialized value in rw_lock_set_writer_id_and_recursion_flag()
+# when Valgrind instrumentation (UNIV_DEBUG_VALGRIND) is not enabled
+
+CREATE TABLE t1 (
+  t1_int INT,
+  t1_time TIME
+) ENGINE=innodb;
+
+CREATE TABLE t2 (
+  t2_int int PRIMARY KEY,
+  t2_int2 INT
+) ENGINE=INNODB;
+
+INSERT INTO t2 VALUES ();
+INSERT INTO t1 VALUES ();
+
+SELECT *
+FROM t1 AS t1a
+WHERE NOT EXISTS
+  (SELECT *
+   FROM t1 AS t1b
+   WHERE t1b.t1_int NOT IN
+     (SELECT t2.t2_int
+      FROM t2
+      WHERE t1b.t1_time LIKE t1b.t1_int
+      OR t1b.t1_time <> t2.t2_int2
+      AND 6=7
+ )
+)
+;
+DROP TABLE t1,t2;

=== modified file 'storage/innobase/include/sync0rw.ic'
--- a/storage/innobase/include/sync0rw.ic	revid:jimmy.yang@stripped110215094034-qqm5uvjwj3912vgs
+++ b/storage/innobase/include/sync0rw.ic	revid:marko.makela@stripped01-jpr9d1sqngq470f2
@@ -280,7 +280,6 @@ rw_lock_set_writer_id_and_recursion_flag
 	local_thread = lock->writer_thread;
 	success = os_compare_and_swap_thread_id(
 		&lock->writer_thread, local_thread, curr_thread);
-	UNIV_MEM_VALID(&success, sizeof(success));
 	ut_a(success);
 	lock->recursive = recursive;
 

=== modified file 'storage/innobase/sync/sync0rw.c'
--- a/storage/innobase/sync/sync0rw.c	revid:jimmy.yang@stripped2vgs
+++ b/storage/innobase/sync/sync0rw.c	revid:marko.makela@stripped
@@ -271,6 +271,9 @@ rw_lock_create_func(
 	contains garbage at initialization and cannot be used for
 	recursive x-locking. */
 	lock->recursive = FALSE;
+	/* Silence Valgrind when UNIV_DEBUG_VALGRIND is not enabled. */
+	memset((void*) &lock->writer_thread, 0, sizeof lock->writer_thread);
+	UNIV_MEM_INVALID(&lock->writer_thread, sizeof lock->writer_thread);
 
 #ifdef UNIV_SYNC_DEBUG
 	UT_LIST_INIT(lock->debug_list);

Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20110215095201-jpr9d1sqngq470f2.bundle
Thread
bzr commit into mysql-trunk-innodb branch (marko.makela:3500) marko.makela15 Feb