null+****@clear*****
null+****@clear*****
2011年 6月 21日 (火) 14:38:22 JST
Kouhei Sutou 2011-06-21 05:38:22 +0000 (Tue, 21 Jun 2011)
New Revision: f66ede20b73da0ef17723d28b818ae12fc7c6be6
Log:
don't use truncate with MySQL 5.1.
Modified files:
ha_mroonga.cc
ha_mroonga.h
Modified: ha_mroonga.cc (+2 -0)
===================================================================
--- ha_mroonga.cc 2011-06-21 05:38:02 +0000 (e51055c)
+++ ha_mroonga.cc 2011-06-21 05:38:22 +0000 (bd5c644)
@@ -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;
@@ -4824,6 +4825,7 @@ int ha_mroonga::truncate()
DBUG_RETURN(wrapper_truncate());
DBUG_RETURN(default_truncate());
}
+#endif
double ha_mroonga::wrapper_scan_time()
{
Modified: ha_mroonga.h (+4 -0)
===================================================================
--- ha_mroonga.h 2011-06-21 05:38:02 +0000 (7fa0cbc)
+++ ha_mroonga.h 2011-06-21 05:38:22 +0000 (fef1459)
@@ -195,7 +195,9 @@ public:
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();
@@ -362,8 +364,10 @@ private:
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);