summaryrefslogtreecommitdiff
path: root/sql/ha_innodb.cc
diff options
context:
space:
mode:
authorunknown <osku@127.(none)>2005-08-25 14:15:31 +0300
committerunknown <osku@127.(none)>2005-08-25 14:15:31 +0300
commit9363d02fbb1e3583b5fbb0d96c63a26f76d2779d (patch)
tree87e1997ddb9b88da23513f56d087b5fec6a87583 /sql/ha_innodb.cc
parent8ff1361d17195ac03beda833ee02cc64fd7989ec (diff)
parent1d406fb9a23a982fbcb4090a6b98885974d01a2f (diff)
downloadmariadb-git-9363d02fbb1e3583b5fbb0d96c63a26f76d2779d.tar.gz
Merge osalerma@bk-internal.mysql.com:/home/bk/mysql-5.0
into 127.(none):/home/osku/mysql-5.0 sql/ha_innodb.cc: Auto merged
Diffstat (limited to 'sql/ha_innodb.cc')
-rw-r--r--sql/ha_innodb.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index a27f1942158..4e69fcdf4fa 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -6888,6 +6888,28 @@ ha_innobase::get_auto_increment()
return((ulonglong) nr);
}
+/* See comment in handler.h */
+int
+ha_innobase::reset_auto_increment()
+{
+ DBUG_ENTER("ha_innobase::reset_auto_increment");
+
+ row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt;
+ int error;
+
+ error = row_lock_table_autoinc_for_mysql(prebuilt);
+
+ if (error != DB_SUCCESS) {
+ error = convert_error_code_to_mysql(error, user_thd);
+
+ DBUG_RETURN(error);
+ }
+
+ dict_table_autoinc_initialize(prebuilt->table, 0);
+
+ DBUG_RETURN(0);
+}
+
/***********************************************************************
Compares two 'refs'. A 'ref' is the (internal) primary key value of the row.
If there is no explicitly declared non-null unique key or a primary key, then