diff options
author | Monty <monty@mariadb.org> | 2019-05-08 23:39:29 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2019-05-23 01:20:18 +0300 |
commit | 043a3a0176e220e4648521b2e89881c5261e6dd4 (patch) | |
tree | 9dc6eb8ab7a8c136926d98ee4396abcde40c8c55 /sql/ha_sequence.cc | |
parent | 10e8ba13c66c9373d765b2dd7cc0159ce3191510 (diff) | |
download | mariadb-git-043a3a0176e220e4648521b2e89881c5261e6dd4.tar.gz |
Avoid not needed renames in ALTER TABLE
Removed not needed table renames when doing ALTER TABLE when engine
changes and both of the following is true:
- Either new or old engine does not store the table in files
- Neither old or new engine uses files from another engine
We also skip renames when ALTER TABLE does an explicit rename
This improves performance, especially for engines where rename is
a slow operation (like the upcoming S3 engine)
Diffstat (limited to 'sql/ha_sequence.cc')
-rw-r--r-- | sql/ha_sequence.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/ha_sequence.cc b/sql/ha_sequence.cc index 65bb0daf8cf..ad5e54ba82e 100644 --- a/sql/ha_sequence.cc +++ b/sql/ha_sequence.cc @@ -101,7 +101,7 @@ int ha_sequence::open(const char *name, int mode, uint flags) ha_open() sets the following for us. We have to set this for the underlying handler */ - file->cached_table_flags= file->table_flags(); + file->cached_table_flags= (file->table_flags() | HA_REUSES_FILE_NAMES); file->reset_statistics(); internal_tmp_table= file->internal_tmp_table= |