Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 5.5.35
-
Fix Version/s: 5.5.36
-
Component/s: None
-
Labels:None
Description
2 threads required to reproduce deadlock:
thread1: CREATE/DROP FUNCTION
thread2: SELECT * FROM view having references to UDF/SP
mtr test case:
# Prepare test
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO";
CREATE VIEW v1 AS SELECT myfunc_int(1);
delimiter |;
CREATE PROCEDURE p_select(x INT)
BEGIN
DECLARE CONTINUE HANDLER FOR 1126 BEGIN END;
WHILE x DO
SET x= x - 1;
FLUSH TABLES;
SELECT * FROM v1;
END WHILE;
END|
delimiter ;|
connect(con1, localhost, root,,);
# Start test
connection con1;
--send CALL p_select(100)
connection default;
disable_result_log;
disable_query_log;
let $i= 100;
while ($i)
{
FLUSH TABLES;
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
eval CREATE FUNCTION myfunc_double RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO";
DROP FUNCTION myfunc_double;
dec $i;
}
# Cleanup
connection con1;
reap;
connection default;
enable_query_log;
enable_result_log;
disconnect con1;
DROP PROCEDURE p_select;
DROP VIEW v1;
DROP FUNCTION myfunc_int;
Should not affect 10.0.
Gliffy Diagrams
Attachments
Issue Links
- is part of
-
MDEV-5089 possible deadlocks between rwlocks and mutexes
-
- Closed
-
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Sergei, please review fix for this bug.