diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-11-01 15:23:18 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-11-01 15:23:18 +0200 |
commit | ec40980ddd921a3a765c23cc430c9c219e48ea85 (patch) | |
tree | 6553832d3d3fb4b2cb39aea6a1d69e54275f6eb2 /sql/ha_partition.h | |
parent | 6801f80aface011811d2978f86c03a25ca7b9165 (diff) | |
parent | 9c72963d2aef783cae652b5b8ac01f7aa2bcb43a (diff) | |
download | mariadb-git-ec40980ddd921a3a765c23cc430c9c219e48ea85.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'sql/ha_partition.h')
-rw-r--r-- | sql/ha_partition.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/ha_partition.h b/sql/ha_partition.h index 6407a607fe7..598c63837c7 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -1329,6 +1329,19 @@ private: unlock_auto_increment(); } + void check_insert_autoincrement() + { + /* + If we INSERT into the table having the AUTO_INCREMENT column, + we have to read all partitions for the next autoincrement value + unless we already did it. + */ + if (!part_share->auto_inc_initialized && + ha_thd()->lex->sql_command == SQLCOM_INSERT && + table->found_next_number_field) + bitmap_set_all(&m_part_info->read_partitions); + } + public: /* |