diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-12-01 19:51:14 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-12-01 19:51:14 +0200 |
commit | 589cf8dbf3accf57673d7e2f7a4435f7eaf33565 (patch) | |
tree | aa38a67d10f71fc781188341857e34d437fa9199 /sql/sql_delete.cc | |
parent | a3531775b1efe06e2439a0c8ab668a2b69c859eb (diff) | |
parent | e30a05f4540b581df2e7d98bd7e812aeff603744 (diff) | |
download | mariadb-git-589cf8dbf3accf57673d7e2f7a4435f7eaf33565.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index a4ef698590c..5d006a7518c 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -260,7 +260,7 @@ int update_portion_of_time(THD *thd, TABLE *table, uint dst_fieldno= lcond ? table->s->period.end_fieldno : table->s->period.start_fieldno; - table->file->store_auto_increment(); + ulonglong prev_insert_id= table->file->next_insert_id; store_record(table, record[1]); if (likely(!res)) res= src->save_in_field(table->field[dst_fieldno], true); @@ -276,7 +276,7 @@ int update_portion_of_time(THD *thd, TABLE *table, TRG_ACTION_AFTER, true); restore_record(table, record[1]); if (res) - table->file->restore_auto_increment(); + table->file->restore_auto_increment(prev_insert_id); if (likely(!res) && lcond && rcond) res= table->period_make_insert(period_conds.end.item, |