Bug #9099 Stored procedure won't handle handler statement
Submitted: 10 Mar 2005 19:26 Modified: 7 Sep 2005 11:05
Reporter: Peter Gulutzan Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.3-alpha-debug-log OS:Linux (SUSE 9.2)
Assigned to: Assigned Account CPU Architecture:Any

[10 Mar 2005 19:26] Peter Gulutzan
Description:
If I try to execute a stored procedure that contains a
HANDLER statement, I see a message "Table was not locked".
But I can't lock a table within a stored procedure.

How to repeat:
mysql> create table t26 (s1 int, primary key (s1));
Query OK, 0 rows affected (0.01 sec)

mysql> create procedure p26 () handler t26 open;
Query OK, 0 rows affected (0.00 sec)

mysql> call p26();
ERROR 1100 (HY000): Table 't26' was not locked with LOCK TABLES
[7 Sep 2005 11:05] Alexander Nozdrin
This bug is a copy of Bug#12995: : Inside function "Table 't4' was not locked with LOCK TABLES" (http://bugs.mysql.com/bug.php?id=12995)