mysql> SELECT version_tokens_set(’tok1=value1;tok2=value2’); +-----------------------------------------------+ | version_tokens_set(’tok1=value1;tok2=value2’) | +-----------------------------------------------+ | 2 version tokens set. | +-----------------------------------------------+ 

• version_tokens_show() 

Returns the server’s list of version tokens as a binary string containing a semicolon-separated list of name = value  pairs. 

mysql> SELECT version_tokens_show(); +--------------------------+ | version_tokens_show() | +--------------------------+ | tok2=value2;tok1=value1; | +--------------------------+ 

The following functions permit version tokens to be locked and unlocked: 

• version_tokens_lock_exclusive( token_name [, token_name ] ..., timeout ) 

Acquires exclusive locks on one or more version tokens, specified by name as strings, timing out with an error if the locks are not acquired within the given timeout value. 

mysql> SELECT version_tokens_lock_exclusive(’lock1’, ’lock2’, 10); +-----------------------------------------------------+ | version_tokens_lock_exclusive(’lock1’, ’lock2’, 10) | +-----------------------------------------------------+ | 1 | +-----------------------------------------------------+ 

• version_tokens_lock_shared( token_name [, token_name ] ..., timeout ) 

Acquires shared locks on one or more version tokens, specified by name as strings, timing out with an error if the locks are not acquired within the given timeout value. 

mysql> SELECT version_tokens_lock_shared(’lock1’, ’lock2’, 10); +--------------------------------------------------+ | version_tokens_lock_shared(’lock1’, ’lock2’, 10) | +--------------------------------------------------+ | 1 | +--------------------------------------------------+ 

• version_tokens_unlock() 

Releases all locks that were acquired within the current session using version_tokens_lock_exclusive()  and version_tokens_lock_shared() . 

mysql> SELECT version_tokens_unlock(); +-------------------------+ | version_tokens_unlock() | +-------------------------+ | 1 | +-------------------------+ 

The locking functions share these characteristics: 

•The return value is nonzero for success. Otherwise, an error occurs. 

•Token names are strings. 

