MXS-1591 Mark GET_LOCK(...) et.al. as WRITE
The follwing statements SELECT GET_LOCK('lock1',10); SELECT IS_FREE_LOCK('lock1'); SELECT IS_USED_LOCK('lock1'); SELECT RELEASE_LOCK('lock1'); are now classified as QUERY_TYPE_READ|QUERY_TYPE_WRITE. That will make cooperative locking work if these functions are used inside non-read-only transactions and outside transanctions.
This commit is contained in:
@ -250,27 +250,33 @@ static const char* BUILTIN_FUNCTIONS[] =
|
||||
* https://mariadb.com/kb/en/mariadb/miscellaneous-functions/
|
||||
*/
|
||||
"default",
|
||||
"get_lock",
|
||||
"inet6_aton",
|
||||
"inet6_ntoa",
|
||||
"inet_aton",
|
||||
"inet_ntoa",
|
||||
"is_free_lock",
|
||||
"is_ipv4",
|
||||
"is_ipv4_compat",
|
||||
"is_ipv4_mapped",
|
||||
"is_ipv6",
|
||||
"is_used_lock",
|
||||
"last_value",
|
||||
"master_gtid_wait",
|
||||
"master_pos_wait",
|
||||
"name_const",
|
||||
"release_lock",
|
||||
"sleep",
|
||||
"uuid",
|
||||
"uuid_short",
|
||||
"values",
|
||||
|
||||
/**
|
||||
* Although conceptually non-updating, we classify these as WRITE as
|
||||
* that will force them to be sent to _master_ outside transactions.
|
||||
*
|
||||
* "get_lock",
|
||||
* "is_free_lock",
|
||||
* "is_used_lock",
|
||||
* "release_lock",
|
||||
*/
|
||||
|
||||
/*
|
||||
* Numeric Functions
|
||||
* https://mariadb.com/kb/en/mariadb/numeric-functions/
|
||||
|
Reference in New Issue
Block a user