mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -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) {}
|
||||
|
Reference in New Issue
Block a user