summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authorunknown <osku@127.(none)>2005-08-30 12:39:20 +0300
committerunknown <osku@127.(none)>2005-08-30 12:39:20 +0300
commitc12a760ce9e0c99a2b943bf2de4d7278fb8fa21e (patch)
tree1980d4b95ca3a5967f5fba11239975ef072e8178 /sql/handler.h
parentb3dcaff948d27cc0a659ef56cc63b0b3aa20a1c0 (diff)
downloadmariadb-git-c12a760ce9e0c99a2b943bf2de4d7278fb8fa21e.tar.gz
Bug #11946: Review fixes.
sql/ha_innodb.cc: Add 'value' parameter to reset_auto_increment. sql/ha_innodb.h: Add 'value' parameter to reset_auto_increment. sql/handler.h: Add 'value' parameter to reset_auto_increment. sql/mysql_priv.h: Add 'reset_auto_increment' parameter to mysql_delete. sql/sql_delete.cc: Add 'reset_auto_increment' parameter to mysql_delete, and use it instead of checking for SQLCOM_TRUNCATE. mysql_truncate: Adapt to changes in mysql_delete. sql/sql_parse.cc: mysql_execute_command: Adapt to changes in mysql_delete.
Diffstat (limited to 'sql/handler.h')
-rw-r--r--sql/handler.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/sql/handler.h b/sql/handler.h
index c28554618a6..860f34f15ce 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -651,12 +651,13 @@ public:
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()
+ /*
+ Reset the auto-increment counter to the given value, i.e. the next row
+ inserted will get the given value. This is called e.g. after TRUNCATE
+ is emulated by doing a 'DELETE FROM t'. HA_ERR_WRONG_COMMAND is
+ returned by storage engines that don't support this operation.
+ */
+ virtual int reset_auto_increment(ulonglong value)
{ return HA_ERR_WRONG_COMMAND; }
virtual void update_create_info(HA_CREATE_INFO *create_info) {}