mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
WL#2130: Table locking for stored FUNCTIONs
Collect all tables and SPs refered by a statement, and open all tables with an implicit LOCK TABLES. Do find things refered by triggers and views, we open them first (and then repeat this until nothing new is found), before doing the actual lock tables.
This commit is contained in:
@ -41,8 +41,8 @@ lock tables t1 write;
|
||||
check table t2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t2 check error Table 't2' was not locked with LOCK TABLES
|
||||
insert into t1 select nr from t1;
|
||||
ERROR HY000: Table 't1' was not locked with LOCK TABLES
|
||||
insert into t1 select index1,nr from t1;
|
||||
ERROR 42000: INSERT command denied to user 'root'@'localhost' for column 'index1' in table 't1'
|
||||
unlock tables;
|
||||
lock tables t1 write, t1 as t1_alias read;
|
||||
insert into t1 select index1,nr from t1 as t1_alias;
|
||||
|
Reference in New Issue
Block a user