Server IP : 172.67.216.182 / Your IP : 172.68.164.146 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/src/mysql-test/suite/binlog/r/ |
Upload File : |
CREATE TABLE t1(a int primary key); CREATE TABLE t2(a int primary key); BEGIN; # # Insert values on table and savepoints # SAVEPOINT S1; INSERT INTO t1 values(3); INSERT INTO t1 values(4); SAVEPOINT S2; INSERT INTO t1 values(5); INSERT INTO t1 values(6); SAVEPOINT S3; SAVEPOINT S4; # # RELEASE S4 # RELEASE SAVEPOINT S4; INSERT INTO t1 values(7); SELECT * FROM t1; a 3 4 5 6 7 # # ROLLBACK TO S2 # ROLLBACK TO S2; # # Confirm S3 was removed when rollbacking to S2 # ROLLBACK TO S3; ERROR 42000: SAVEPOINT S3 does not exist SELECT * FROM t1; a 3 4 INSERT INTO t1 values(7); SELECT * FROM t1; a 3 4 7 # # Confirm S2 exists after ROLLBACK TO S2 # ROLLBACK TO S2; SELECT * FROM t1; a 3 4 COMMIT; # # Check the multitable update on 'rollback to savepoint' # BEGIN; INSERT INTO t1 values (5); SAVEPOINT S1; DELETE FROM t1; INSERT INTO t1 values (1); INSERT INTO t2 SELECT * FROM t1; UPDATE t1,t2 SET t1.a=3, t2.a=3; SELECT * FROM t1; a 3 SELECT * FROM t2; a 3 ROLLBACK TO SAVEPOINT S1; INSERT INTO t2 SELECT * FROM t1; COMMIT; SELECT * FROM t1; a 3 4 5 SELECT * FROM t2; a 3 4 5 DROP TABLE t1; DROP TABLE t2;