summaryrefslogtreecommitdiff
path: root/sql/ha_partition.cc
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@oracle.com>2011-06-13 11:21:54 +0200
committerMattias Jonsson <mattias.jonsson@oracle.com>2011-06-13 11:21:54 +0200
commite827b51fa0a8e7aefd7d38f19725452b15803dfe (patch)
tree02e4e1ccf6ada39e4ced2b065a02463b7afbb986 /sql/ha_partition.cc
parent5276d4199d2ecc4e15d1687b40489453a811ea3b (diff)
parent44aa582bb3e9479917a120d819aa95dc285f4f68 (diff)
downloadmariadb-git-e827b51fa0a8e7aefd7d38f19725452b15803dfe.tar.gz
merge
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r--sql/ha_partition.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index 785d118a5f4..5e23891247d 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -3456,9 +3456,13 @@ exit:
index)
mysql_update does not set table->next_number_field, so we use
table->found_next_number_field instead.
+ Also checking that the field is marked in the write set.
*/
- if (table->found_next_number_field && new_data == table->record[0] &&
- !table->s->next_number_keypart)
+ if (table->found_next_number_field &&
+ new_data == table->record[0] &&
+ !table->s->next_number_keypart &&
+ bitmap_is_set(table->write_set,
+ table->found_next_number_field->field_index))
{
if (!table_share->ha_part_data->auto_inc_initialized)
info(HA_STATUS_AUTO);
@@ -4110,6 +4114,7 @@ void ha_partition::position(const uchar *record)
void ha_partition::column_bitmaps_signal()
{
handler::column_bitmaps_signal();
+ /* Must read all partition fields to make position() call possible */
bitmap_union(table->read_set, &m_part_info->full_part_field_set);
}