1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Bug#30904 SET PASSWORD statement is non-transactional

The SET PASSWORD statement is non-transactional (no explicit transaction
boundaries) in nature and hence is forbidden inside stored functions and
triggers, but it weren't being effectively forbidden.

The implemented fix is to issue a implicit commit with every SET PASSWORD
statement, effectively prohibiting these statements in stored functions
and triggers.
This commit is contained in:
davi@endora.local
2007-10-30 20:51:04 -02:00
parent cd72fffa5f
commit 756a86f06d
5 changed files with 42 additions and 1 deletions

View File

@@ -1523,3 +1523,13 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
SELECT ..inexistent();
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.inexistent()' at line 1
USE test;
create function f1() returns int
begin
set @test = 1, password = password('foo');
return 1;
end|
ERROR HY000: Not allowed to set autocommit from a stored function or trigger
create trigger t1
before insert on t2 for each row set password = password('foo');
delimiter ;|
ERROR HY000: Not allowed to set autocommit from a stored function or trigger