Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.5.35
-
None
-
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.
Attachments
Issue Links
- is part of
-
MDEV-5089 possible deadlocks between rwlocks and mutexes
- Closed