Bug #12995 Inside function "Table 't4' was not locked with LOCK TABLES"
Submitted: 5 Sep 2005 15:52 Modified: 15 Sep 2005 18:42
Reporter: Andrey Hristov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0 BK source OS:Linux (Linux)
Assigned to: Alexander Nozdrin

[5 Sep 2005 15:52] Andrey Hristov
Description:
The use of HADLER interface is allowed in functions and leads to the error message in the title.

How to repeat:
delimiter |

create function f15() returns int begin handler t4 open; return 1; end|

select f15()|

----------
ERROR 1100 (HY000): Table 't4' was not locked with LOCK TABLES
[5 Sep 2005 15:53] Andrey Hristov
create table t4(a int);
[7 Sep 2005 19:05] Alexander Nozdrin
Fixed in 5.0 tree, currently tagged 5.0.13
[15 Sep 2005 18:42] Paul Dubois
Noted in 5.0.13 changelog.