[MDEV-31659] GET_LOCK function does not work as expected in a stored program when character_set_database is set to ucs2. Created: 2023-07-11  Updated: 2023-11-28

Status: Open
Project: MariaDB Server
Component/s: Stored routines
Affects Version/s: 10.4, 10.5, 10.6, 10.9, 10.10, 10.11, 11.0, 11.1, 11.2
Fix Version/s: 10.4, 10.5, 10.6, 10.11, 11.0, 11.1

Type: Bug Priority: Major
Reporter: Ramesh Sivaraman Assignee: Dmitry Shulga
Resolution: Unresolved Votes: 0
Labels: None


 Description   

GET_LOCK function does not work as expected in a stored program when character_set_database is set to ucs2.

--connection 1
delimiter |
CREATE PROCEDURE p1()
BEGIN
 SELECT GET_LOCK('m1', 10000);
 SELECT 'Query OK';
END;
|
delimiter ;
 
SET character_set_database=ucs2;
SET CHARACTER SET DEFAULT;
 
--connection 2
SET character_set_database=ucs2;
SET CHARACTER SET DEFAULT;
SELECT GET_LOCK('m1', 0);
 
--connection 1
CALL p1();

When the procedure is called from session-1, procedure `p1` must wait for resource `m1` to be released from session-2.


Generated at Thu Feb 08 10:25:31 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.