summaryrefslogtreecommitdiff
path: root/sql/ha_sequence.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2019-05-08 23:39:29 +0300
committerMonty <monty@mariadb.org>2019-05-23 01:20:18 +0300
commit043a3a0176e220e4648521b2e89881c5261e6dd4 (patch)
tree9dc6eb8ab7a8c136926d98ee4396abcde40c8c55 /sql/ha_sequence.cc
parent10e8ba13c66c9373d765b2dd7cc0159ce3191510 (diff)
downloadmariadb-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.cc2
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=