savepoint

BEGIN:
 update psf_order set `status`=1 WHERE id='1379256482132643841';
 
 SAVEPOINT s1;
 
 SELECT `status` FROM psf_order WHERE id='1379256482132643841';
 update psf_order set `status`=2 WHERE id='1379256482132643841';
 rollback to s1
 SELECT `status` FROM psf_order WHERE id='1379256482132643841';
 commit
 
  SELECT `status` FROM psf_order WHERE id='1379256482132643841';

 

posted @ 2022-03-11 14:26  八英里  阅读(25)  评论(0编辑  收藏  举报