Bug #37541 Locks Acquired By Stored Functions And Triggers Should Be Documented.
Submitted: 20 Jun 2008 8:28 Modified: 18 Jul 2008 15:22
Reporter: Mikiya Okuno Email Updates:
Status: Closed
Category:Server: Docs Severity:S4 (Feature request)
Version: OS:Any
Assigned to: Paul DuBois Target Version:
Triage: D4 (Minor)

[20 Jun 2008 8:28] Mikiya Okuno
Description:
It is a problem that the following is not documented:

Stored functions acquires table locks previously before it executes its codes. This is in
order to avoid inconsistency in binary logs due to mismatch of orders. When statement
based binary log is used, statements which calls a function is recorded instead of what
is done inside the function. So Stored Functions are not executed in parallel if it
updates the same underlying tables.

In contrast, stored procedures doesn't acquire table level locks unlike stored functions.
All statements executed inside stored procedures are recorded to binary logs even when
statement base binary log is used.

This should be stated on the following page:
http://dev.mysql.com/doc/refman/5.1/en/routine-restrictions.html

How to repeat:
N/A

Suggested fix:
N/A
[18 Jul 2008 15:22] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The
updated documentation will appear on our website shortly, and will be included in the
next release of the relevant products.