1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Bug#59307 Valgrind: uninitialized value in rw_lock_set_writer_id_and_recursion_flag()

rw_lock_create_func(): Initialize lock->writer_thread, so that Valgrind
will not complain even when Valgrind instrumentation is not enabled.
Flag lock->writer_thread uninitialized, so that Valgrind can complain
when it is used uninitialized.

rw_lock_set_writer_id_and_recursion_flag(): Revert the bogus Valgrind
instrumentation that was pushed in the first attempt to fix this bug.
This commit is contained in:
Marko Mäkelä
2011-02-15 10:51:33 +02:00
parent 4a8c835746
commit 0efaef7d46
5 changed files with 69 additions and 1 deletions

View File

@ -0,0 +1,32 @@
-- source include/have_innodb_plugin.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;