diff options
-rw-r--r-- | storage/innobase/row/row0mysql.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc index 5037c0e40b6..d7e3e37ad9e 100644 --- a/storage/innobase/row/row0mysql.cc +++ b/storage/innobase/row/row0mysql.cc @@ -730,8 +730,13 @@ handle_new_error: trx->rollback(savept); } + if (!trx->bulk_insert) { + /* MariaDB will roll back the latest SQL statement */ + break; + } + /* MariaDB will roll back the entire transaction. */ trx->bulk_insert = false; - /* MariaDB will roll back the latest SQL statement */ + trx->last_sql_stat_start.least_undo_no = 0; break; case DB_LOCK_WAIT: err = lock_wait(thr); |