Replaces a term present in one dictionary with a term from a second dictionary and returns the replacement term. This masks the original term by substitution. This function is deprecated in MySQL 8.0.23; use gen_blocklist()  instead. 

• gen_blocklist( str , dictionary_name , replacement_dictionary_name ) 

Replaces a term present in one dictionary with a term from a second dictionary and returns the replacement term. This masks the original term by substitution. This function was added in MySQL 8.0.23; use it instead of gen_blacklist() . 

Arguments: 

• str : A string that indicates the term to replace. 

• dictionary_name : A string that names the dictionary containing the term to replace. 

• replacement_dictionary_name : A string that names the dictionary from which to choose the replacement term. 

Return value: 

A string randomly chosen from replacement_dictionary_name  as a replacement for str , or str if it does not appear in dictionary_name , or NULL  if either dictionary name is not in the dictionary registry. 

If the term to replace appears in both dictionaries, it is possible for the return value to be the same term. 

mysql> SELECT gen_blocklist(’Berlin’, ’DE_Cities’, ’US_Cities’); +---------------------------------------------------+ | gen_blocklist(’Berlin’, ’DE_Cities’, ’US_Cities’) | +---------------------------------------------------+ | Phoenix | +---------------------------------------------------+ 

• gen_dictionary( dictionary_name ) 

Returns a random term from a dictionary. 

Arguments: 

• dictionary_name : A string that names the dictionary from which to choose the term. 

Return value: 

A random term from the dictionary as a string, or NULL  if the dictionary name is not in the dictionary registry. 

mysql> SELECT gen_dictionary(’mydict’); +--------------------------+ | gen_dictionary(’mydict’) | +--------------------------+ | My term | +--------------------------+ mysql> SELECT gen_dictionary(’no-such-dict’); +--------------------------------+ 

