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 /storage | |
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 'storage')
-rw-r--r-- | storage/innobase/trx/trx0roll.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/storage/innobase/trx/trx0roll.cc b/storage/innobase/trx/trx0roll.cc index 59c9a319330..4de7ab29243 100644 --- a/storage/innobase/trx/trx0roll.cc +++ b/storage/innobase/trx/trx0roll.cc @@ -558,9 +558,13 @@ trx_release_savepoint_for_mysql( if (savep != NULL) { trx_roll_savepoint_free(trx, savep); + return DB_SUCCESS; + } else if (trx->last_sql_stat_start.least_undo_no == 0) { + /* Bulk insert could have discarded savepoints */ + return DB_SUCCESS; } - return(savep != NULL ? DB_SUCCESS : DB_NO_SAVEPOINT); + return DB_NO_SAVEPOINT; } /*******************************************************************//** |