Navigation Menu

Skip to content

Commit

Permalink
don't use truncate with MySQL 5.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jun 21, 2011
1 parent 52698c5 commit f66ede2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ha_mroonga.cc
Expand Up @@ -4799,6 +4799,7 @@ int ha_mroonga::delete_all_rows()
DBUG_RETURN(default_delete_all_rows());
}

#if MYSQL_VERSION_ID >= 50500
int ha_mroonga::wrapper_truncate()
{
int error;
Expand All @@ -4824,6 +4825,7 @@ int ha_mroonga::truncate()
DBUG_RETURN(wrapper_truncate());
DBUG_RETURN(default_truncate());
}
#endif

double ha_mroonga::wrapper_scan_time()
{
Expand Down
4 changes: 4 additions & 0 deletions ha_mroonga.h
Expand Up @@ -195,7 +195,9 @@ class ha_mroonga: public handler
void start_bulk_insert(ha_rows rows);
int end_bulk_insert();
int delete_all_rows();
#if MYSQL_VERSION_ID >= 50500
int truncate();
#endif
double scan_time();
double read_time(uint index, uint ranges, ha_rows rows);
const key_map *keys_to_use_for_scanning();
Expand Down Expand Up @@ -362,8 +364,10 @@ class ha_mroonga: public handler
int default_read_multi_range_next(KEY_MULTI_RANGE **found_range_p);
int wrapper_delete_all_rows();
int default_delete_all_rows();
#if MYSQL_VERSION_ID >= 50500
int wrapper_truncate();
int default_truncate();
#endif
double wrapper_scan_time();
double default_scan_time();
double wrapper_read_time(uint index, uint ranges, ha_rows rows);
Expand Down

0 comments on commit f66ede2

Please sign in to comment.