summaryrefslogtreecommitdiff
path: root/storage/heap
diff options
context:
space:
mode:
authorSatya B <satya.bn@sun.com>2009-07-08 17:41:34 +0530
committerSatya B <satya.bn@sun.com>2009-07-08 17:41:34 +0530
commit77f73116730656b003e5fd88f5ad928ed0195075 (patch)
treee9c57ad4b1bc6dc0c37c1b2d26c04ff1bf3a12fe /storage/heap
parent70f6351ba916cd399f02d2c5bb4c60b7022fee11 (diff)
downloadmariadb-git-77f73116730656b003e5fd88f5ad928ed0195075.tar.gz
Bug#35111 - Truncate a MyISAM partitioned table does not reset
the auto_increment value This is an alternative patch that instead of allowing RECREATE TABLE on TRUNCATE TABLE it implements reset_auto_increment that is called after delete_all_rows. Note: this bug was fixed by Mattias Jonsson: Pusing this patch: http://lists.mysql.com/commits/70370
Diffstat (limited to 'storage/heap')
-rw-r--r--storage/heap/ha_heap.cc8
-rw-r--r--storage/heap/ha_heap.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc
index 19863d83874..fb7c13e4e41 100644
--- a/storage/heap/ha_heap.cc
+++ b/storage/heap/ha_heap.cc
@@ -419,6 +419,14 @@ int ha_heap::delete_all_rows()
return 0;
}
+
+int ha_heap::reset_auto_increment(ulonglong value)
+{
+ file->s->auto_increment= value;
+ return 0;
+}
+
+
int ha_heap::external_lock(THD *thd, int lock_type)
{
return 0; // No external locking
diff --git a/storage/heap/ha_heap.h b/storage/heap/ha_heap.h
index 5c5ad43658e..22722129f4c 100644
--- a/storage/heap/ha_heap.h
+++ b/storage/heap/ha_heap.h
@@ -98,6 +98,7 @@ public:
int reset();
int external_lock(THD *thd, int lock_type);
int delete_all_rows(void);
+ int reset_auto_increment(ulonglong value);
int disable_indexes(uint mode);
int enable_indexes(uint mode);
int indexes_are_disabled(void);