1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-4017 - GET_LOCK() with negative timeouts has strange behavior

GET_LOCK() silently accepted negative values and NULL for timeout.
Fixed GET_LOCK() to issue a warning and return NULL in such cases.
This commit is contained in:
Sergey Vojtovich
2015-07-23 12:50:58 +04:00
parent e40bc65933
commit 392df76bc3
6 changed files with 40 additions and 4 deletions

View File

@@ -258,7 +258,7 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back
create table t0 (n int);
insert t0 select * from t1;
set autocommit=1;
insert into t0 select GET_LOCK("lock1",null);
insert into t0 select GET_LOCK("lock1",0);
set autocommit=0;
create table t2 (n int) engine=innodb;
insert into t2 values (3);