Bug #40419 Not locking metadata on alter procedure
Submitted: 30 Oct 2008 10:19 Modified: 7 Jul 2009 15:01
Reporter: Jørgen Austvik Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version:mysql-6.0 OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[30 Oct 2008 10:19] Jørgen Austvik
Description:
When I run two concurrent connections, one doing ALTER PROCEDURE, the other doing DROP PROCEDURE, and I get them to run synchronized in such a way that the ALTER PROCEDURE should lock the procedure metadata object before the DROP PROCEDURE tries to grab the lock, the DROP PROCEDURE will not wait for ALTER PROCEDURE to unlock, and ALTER PROCEDURE will receive ER_SP_DOES_NOT_EXIST.

How to repeat:
Run attached test.

Suggested fix:
See WL#4299
[30 Oct 2008 10:19] Jørgen Austvik
Testcase to reproduce

Attachment: 1_10.test (application/octet-stream, text), 760 bytes.

[31 Oct 2008 21:32] Sveta Smirnova
Thank you for the report.

But version 6.0.1 is old and I can not repeat described behavior with current development sources. Please try with current version 6.0.7 and inform us if problem still exists.
[3 Nov 2008 9:35] Sveta Smirnova
Thank you for the feedback.

I still can not repeat described behavior with mysql-6.0-runtime tree pulled today. Please update your version, try with it and inform if problem still exists.

$bzr info -v
Checkout (format: pack-0.92)
Location:
       checkout root: .
  checkout of branch: XXX/mysql-6.0-runtime/

...

Branch history:
      2741 revisions
      1081 committers
      3016 days old
   first revision: Mon 2000-07-31 21:10:05 +0200
  latest revision: Fri 2008-10-31 07:51:49 +0300

Repository:
     62605 revisions
[3 Nov 2008 15:00] Sveta Smirnova
Thank you for the feedback.

Verified as described.
[7 Jul 2009 15:01] Konstantin Osipov
A duplicate of Bug#30977.