summaryrefslogtreecommitdiff
path: root/sql/ha_heap.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/ha_heap.cc')
-rw-r--r--sql/ha_heap.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/ha_heap.cc b/sql/ha_heap.cc
index 79d4575ff1b..3aaa0287098 100644
--- a/sql/ha_heap.cc
+++ b/sql/ha_heap.cc
@@ -176,7 +176,10 @@ int ha_heap::write_row(byte * buf)
if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT)
table->timestamp_field->set_time();
if (table->next_number_field && buf == table->record[0])
- update_auto_increment();
+ {
+ if ((res= update_auto_increment()))
+ return res;
+ }
res= heap_write(file,buf);
if (!res && (++records_changed*HEAP_STATS_UPDATE_THRESHOLD >
file->s->records))