diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2023-03-17 16:41:27 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2023-03-17 16:41:27 +0530 |
commit | 18e4978edc13991e5c424084ef7e1a5c717b86a6 (patch) | |
tree | 07df361cefe8b84552bb83e2d72a372769593491 /mysql-test/suite | |
parent | a55b951e6082a4ce9a1f2ed5ee176ea7dbbaf1f2 (diff) | |
download | mariadb-git-18e4978edc13991e5c424084ef7e1a5c717b86a6.tar.gz |
MDEV-29975 InnoDB fails to release savepoint during bulk insert
- InnoDB does rollback the whole transaction and discards the
savepoint when there is a failure happens during bulk
insert operation. When server request to release the savepoint,
InnoDB should return DB_SUCCESS when it deals with bulk
insert operation
Diffstat (limited to 'mysql-test/suite')
-rw-r--r-- | mysql-test/suite/innodb/r/insert_into_empty.result | 15 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/insert_into_empty.test | 14 |
2 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/r/insert_into_empty.result b/mysql-test/suite/innodb/r/insert_into_empty.result index e7f051d3e56..25cc489bdab 100644 --- a/mysql-test/suite/innodb/r/insert_into_empty.result +++ b/mysql-test/suite/innodb/r/insert_into_empty.result @@ -214,4 +214,19 @@ WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test'; TABLE_ROWS AVG_ROW_LENGTH>0 3 1 DROP TABLE t1; +# +# MDEV-29975 InnoDB fails to release savepoint during bulk insert +# +CREATE TABLE t (c INT KEY) ENGINE=InnoDB; +begin; +INSERT INTO t VALUES (0,0); +ERROR 21S01: Column count doesn't match value count at row 1 +SAVEPOINT a; +INSERT INTO t VALUES (0),(0); +ERROR 23000: Duplicate entry '0' for key 'PRIMARY' +SAVEPOINT a; +commit; +SELECT * FROM t; +c +DROP TABLE t; # End of 10.6 tests diff --git a/mysql-test/suite/innodb/t/insert_into_empty.test b/mysql-test/suite/innodb/t/insert_into_empty.test index af8ed8be90d..932ab4c2a23 100644 --- a/mysql-test/suite/innodb/t/insert_into_empty.test +++ b/mysql-test/suite/innodb/t/insert_into_empty.test @@ -233,4 +233,18 @@ SELECT TABLE_ROWS, AVG_ROW_LENGTH>0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test'; DROP TABLE t1; +--echo # +--echo # MDEV-29975 InnoDB fails to release savepoint during bulk insert +--echo # +CREATE TABLE t (c INT KEY) ENGINE=InnoDB; +begin; +--error ER_WRONG_VALUE_COUNT_ON_ROW +INSERT INTO t VALUES (0,0); +SAVEPOINT a; +--error ER_DUP_ENTRY +INSERT INTO t VALUES (0),(0); +SAVEPOINT a; +commit; +SELECT * FROM t; +DROP TABLE t; --echo # End of 10.6 tests |