diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-11-05 16:15:20 +0100 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-11-07 08:52:30 +0100 |
commit | 3ad37ed0eb343cd173b103974aded5783958a88e (patch) | |
tree | f4ff854553d26a9e7d57791e7d671d4349a58d2d /sql/ha_partition.h | |
parent | 46f2f24ec43e9c1fa2d994afd615f58736c00d65 (diff) | |
parent | 0339cbe2f628f8a122ba7ea3a75fc99fa1dc4c96 (diff) | |
download | mariadb-git-3ad37ed0eb343cd173b103974aded5783958a88e.tar.gz |
Merge 10.4 into 10.5
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 0fe98dc4608..ff02ea5aa1c 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: /* |