Cannot rollback user-defined variables in MySQL
First, I set John to the user-defined variable @name as shown below: SET @name = 'John'; Then, I set David to @name in a transaction, then rollbacked as shown below: BEGIN; SET @name = 'David'; ROLLBACK; But, @name was not…