summaryrefslogtreecommitdiff
path: root/storage/myisam
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@sun.com>2009-07-14 15:06:04 +0500
committerSergey Vojtovich <svoj@sun.com>2009-07-14 15:06:04 +0500
commitcc541211c8232ff41386f99cebc446da1a06cacf (patch)
tree74e564b644c182b72bd6b9ad0cc93ae70454e898 /storage/myisam
parent880743284eb250e1e1a33b1d3705443741b9cca2 (diff)
parentf9025ea331802d0427b46235d5ddf15b7ee4e795 (diff)
downloadmariadb-git-cc541211c8232ff41386f99cebc446da1a06cacf.tar.gz
Merge 5.1-bugteam -> 5.1-innodb_plugin.
Diffstat (limited to 'storage/myisam')
-rw-r--r--storage/myisam/ha_myisam.cc11
-rw-r--r--storage/myisam/ha_myisam.h1
2 files changed, 11 insertions, 1 deletions
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index cf290e2018a..d0e5f5a5c88 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -95,7 +95,7 @@ static void mi_check_print_msg(MI_CHECK *param, const char* msg_type,
if (!thd->vio_ok())
{
- sql_print_error(msgbuf);
+ sql_print_error("%s", msgbuf);
return;
}
@@ -1112,6 +1112,9 @@ int ha_myisam::repair(THD *thd, MI_CHECK &param, bool do_optimize)
param.out_flag= 0;
strmov(fixed_name,file->filename);
+ // Release latches since this can take a long time
+ ha_release_temporary_latches(thd);
+
// Don't lock tables if we have used LOCK TABLE
if (!thd->locked_tables &&
mi_lock_database(file, table->s->tmp_table ? F_EXTRA_LCK : F_WRLCK))
@@ -1867,6 +1870,12 @@ int ha_myisam::delete_all_rows()
return mi_delete_all_rows(file);
}
+int ha_myisam::reset_auto_increment(ulonglong value)
+{
+ file->s->state.auto_increment= value;
+ return 0;
+}
+
int ha_myisam::delete_table(const char *name)
{
return mi_delete_table(name);
diff --git a/storage/myisam/ha_myisam.h b/storage/myisam/ha_myisam.h
index ca44ae9ad87..55a5eac92de 100644
--- a/storage/myisam/ha_myisam.h
+++ b/storage/myisam/ha_myisam.h
@@ -101,6 +101,7 @@ class ha_myisam: public handler
int reset(void);
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);