The REGISTER EVENT statement tells the server that you would like to be notified of all future occurrences of the specified event, even if you are not yet waiting for it.
The REGISTER EVENT statement is allowed only inside stored procedures. For more details, see wait_register_statement