+----------------------------------+ | version_tokens_set(’tok1=a; =c’) | +----------------------------------+ | 1 version tokens set. | +----------------------------------+ 1 row in set, 1 warning (0.00 sec) mysql> SHOW WARNINGS\G *************************** 1. row *************************** Level: Warning Code: 42000 Message: Invalid version token pair encountered. The list provided is only partially updated. 1 row in set (0.00 sec) 

As mentioned previously, version tokens are defined using a semicolon-separated list of name = value pairs. Consider this invocation of version_tokens_set() : 

mysql> SELECT version_tokens_set(’tok1=b;;; tok2= a = b ; tok1 = 1\’2 3"4’) +---------------------------------------------------------------+ | version_tokens_set(’tok1=b;;; tok2= a = b ; tok1 = 1\’2 3"4’) | +---------------------------------------------------------------+ | 3 version tokens set. | +---------------------------------------------------------------+ 

Version Tokens interprets the argument as follows: 

•Whitespace around names and values is ignored. Whitespace within names and values is permitted. (For version_tokens_delete() , which takes a list of names without values, whitespace around names is ignored.) 

•There is no quoting mechanism. 

•Order of tokens is not significant except that if a token list contains multiple instances of a given token name, the last value takes precedence over earlier values. 

Given those rules, the preceding version_tokens_set()  call results in a token list with two tokens: tok1  has the value 1’2 3"4 , and tok2  has the value a = b . To verify this, call version_tokens_show() : 

mysql> SELECT version_tokens_show(); +--------------------------+ | version_tokens_show() | +--------------------------+ | tok2=a = b;tok1=1’2 3"4; | +--------------------------+ 

If the token list contains two tokens, why did version_tokens_set()  return the value 3 version tokens set ? That occurred because the original token list contained two definitions for tok1 , and the second definition replaced the first. 

The Version Tokens token-manipulation functions place these constraints on token names and values: 

•Token names cannot contain =  or ;  characters and have a maximum length of 64 characters. 

•Token values cannot contain ;  characters. Length of values is constrained by the value of the max_allowed_packet  system variable. 

•Version Tokens treats token names and values as binary strings, so comparisons are case-sensitive. 

Version Tokens also includes a set of functions enabling tokens to be locked and unlocked: 

