summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorThirunarayanan Balathandayuthapani <thiru@mariadb.com>2023-03-17 16:41:27 +0530
committerThirunarayanan Balathandayuthapani <thiru@mariadb.com>2023-03-17 16:41:27 +0530
commit18e4978edc13991e5c424084ef7e1a5c717b86a6 (patch)
tree07df361cefe8b84552bb83e2d72a372769593491 /storage
parenta55b951e6082a4ce9a1f2ed5ee176ea7dbbaf1f2 (diff)
downloadmariadb-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.cc6
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;
}
/*******************************************************************//**