mirror of
https://github.com/MariaDB/server.git
synced 2025-11-06 13:10:12 +03:00
WL#1967
Support for COMMIT/ROLLBACK optional arguments
This commit is contained in:
@@ -249,6 +249,30 @@ n
|
||||
4
|
||||
5
|
||||
6
|
||||
set autocommit=0;
|
||||
begin;
|
||||
savepoint `my_savepoint`;
|
||||
insert into t1 values (7);
|
||||
savepoint `savept2`;
|
||||
insert into t1 values (3);
|
||||
select n from t1;
|
||||
n
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
rollback to savepoint `savept2`;
|
||||
release savepoint `my_savepoint`;
|
||||
select n from t1;
|
||||
n
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
rollback to savepoint `my_savepoint`;
|
||||
ERROR HY000: Got error 153 during ROLLBACK
|
||||
set autocommit=1;
|
||||
rollback;
|
||||
drop table t1;
|
||||
create table t1 (n int not null primary key) engine=innodb;
|
||||
@@ -1609,14 +1633,14 @@ t2 CREATE TABLE `t2` (
|
||||
drop table t2, t1;
|
||||
show status like "binlog_cache_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_use 24
|
||||
Binlog_cache_use 25
|
||||
show status like "binlog_cache_disk_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_disk_use 0
|
||||
create table t1 (a int) engine=innodb;
|
||||
show status like "binlog_cache_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_use 25
|
||||
Binlog_cache_use 26
|
||||
show status like "binlog_cache_disk_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_disk_use 1
|
||||
@@ -1625,7 +1649,7 @@ delete from t1;
|
||||
commit;
|
||||
show status like "binlog_cache_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_use 26
|
||||
Binlog_cache_use 27
|
||||
show status like "binlog_cache_disk_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_disk_use 1
|
||||
@@ -1693,10 +1717,10 @@ Variable_name Value
|
||||
Innodb_rows_deleted 2070
|
||||
show status like "Innodb_rows_inserted";
|
||||
Variable_name Value
|
||||
Innodb_rows_inserted 31706
|
||||
Innodb_rows_inserted 31708
|
||||
show status like "Innodb_rows_read";
|
||||
Variable_name Value
|
||||
Innodb_rows_read 80153
|
||||
Innodb_rows_read 80162
|
||||
show status like "Innodb_rows_updated";
|
||||
Variable_name Value
|
||||
Innodb_rows_updated 29530
|
||||
|
||||
@@ -129,6 +129,19 @@ insert into t1 values (6);
|
||||
-- error 1062
|
||||
insert into t1 values (4);
|
||||
select n from t1;
|
||||
set autocommit=0;
|
||||
begin;
|
||||
savepoint `my_savepoint`;
|
||||
insert into t1 values (7);
|
||||
savepoint `savept2`;
|
||||
insert into t1 values (3);
|
||||
select n from t1;
|
||||
rollback to savepoint `savept2`;
|
||||
release savepoint `my_savepoint`;
|
||||
select n from t1;
|
||||
-- error 1181
|
||||
rollback to savepoint `my_savepoint`;
|
||||
set autocommit=1;
|
||||
# nop
|
||||
rollback;
|
||||
drop table t1;
|
||||
|
||||
Reference in New Issue
Block a user