To support our own development of admin task for vserver, we have extend SHOW commands to accept variables instead of db_name, tbl_name and so on.
When variable starts with @ or @@ symbols, engine easy can recognize this. But you can also use a local variable of Stored Procedure. Algorithm at first checks if IDENT is the name of a local variable. If no, then consider this as db_name or tbl_name according to grammar of a SHOW command.
set CurrentDbName = ‘accounting’
execute ‘SHOW EVENTS FROM CurrentDbName’