summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authorosku@127.(none) <>2005-08-17 11:00:20 +0300
committerosku@127.(none) <>2005-08-17 11:00:20 +0300
commitfb4803944454562bf02c56be55dbf892d7c92498 (patch)
tree11d5cb3571d6cc02c145f145c4e8f190b0477cf1 /sql/handler.h
parent68d5420d7c0aa9c964b115fab5f7d88c8d2bf84f (diff)
downloadmariadb-git-fb4803944454562bf02c56be55dbf892d7c92498.tar.gz
Fix bug #11946, truncate not always resetting the auto-increment counter
in InnoDB tables.
Diffstat (limited to 'sql/handler.h')
-rw-r--r--sql/handler.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/handler.h b/sql/handler.h
index ef45676207b..c28554618a6 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -650,6 +650,15 @@ public:
{ return (my_errno=HA_ERR_WRONG_COMMAND); }
virtual ulonglong get_auto_increment();
virtual void restore_auto_increment();
+
+ /* This is called after TRUNCATE is emulated by doing a 'DELETE FROM t',
+ in which case we need a separate operation for resetting the table's
+ auto-increment counter. HA_ERR_WRONG_COMMAND is returned by storage
+ engines that have no need for this, i.e. those that can always do a
+ fast TRUNCATE. */
+ virtual int reset_auto_increment()
+ { return HA_ERR_WRONG_COMMAND; }
+
virtual void update_create_info(HA_CREATE_INFO *create_info) {}
/* admin commands - called from mysql_admin_table */