diff options
author | Mattias Jonsson <mattias.jonsson@sun.com> | 2008-10-23 22:14:07 +0200 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@sun.com> | 2008-10-23 22:14:07 +0200 |
commit | 5e353415f8b801d5748d9b92e570758c33641069 (patch) | |
tree | c38541e7d0a13a04986b68b22359df5401c49172 /sql/ha_partition.h | |
parent | 4236c9c0b2d9d43cdd303221c42bed8c074e836e (diff) | |
download | mariadb-git-5e353415f8b801d5748d9b92e570758c33641069.tar.gz |
Bug#40176: update as first partitioning statement
breaks auto increment
The auto_increment value was not initialized if
the first statement after opening a table was
an 'UPDATE'.
solution was to check initialize if it was not,
before trying to increase it in update.
Diffstat (limited to 'sql/ha_partition.h')
-rw-r--r-- | sql/ha_partition.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/ha_partition.h b/sql/ha_partition.h index 685f057dfce..31e5169ac7f 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -878,10 +878,10 @@ private: { HA_DATA_PARTITION *ha_data= (HA_DATA_PARTITION*) table_share->ha_data; lock_auto_increment(); + DBUG_ASSERT(ha_data->auto_inc_initialized == TRUE); /* must check when the mutex is taken */ if (nr >= ha_data->next_auto_inc_val) ha_data->next_auto_inc_val= nr + 1; - ha_data->auto_inc_initialized= TRUE; unlock_auto_increment(); } |