diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-06-11 13:00:18 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-06-11 13:00:18 +0300 |
commit | b42dbdbccd3b939394ca9b608ad91a04235e95f1 (patch) | |
tree | e969f314963faa202fdb6f87d5aca67810844742 /storage/maria/ha_maria.cc | |
parent | 490dcfd5d74ce45cbdd6105e4295116f6a944e2b (diff) | |
parent | cbac8f935182ecc5bb907de3ae48942467f0b8ba (diff) | |
download | mariadb-git-b42dbdbccd3b939394ca9b608ad91a04235e95f1.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'storage/maria/ha_maria.cc')
-rw-r--r-- | storage/maria/ha_maria.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index a84cf485974..8a8e4e6b4f0 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -2724,9 +2724,12 @@ int ha_maria::external_lock(THD *thd, int lock_type) } } } /* if transactional table */ - DBUG_RETURN(maria_lock_database(file, !table->s->tmp_table ? + int result = maria_lock_database(file, !table->s->tmp_table ? lock_type : ((lock_type == F_UNLCK) ? - F_UNLCK : F_EXTRA_LCK))); + F_UNLCK : F_EXTRA_LCK)); + if (!file->s->base.born_transactional) + file->state= &file->s->state.state; // Restore state if clone + DBUG_RETURN(result); } int ha_maria::start_stmt(THD *thd, thr_lock_type lock_type) |