Kouhei Sutou
null+****@clear*****
Thu Oct 4 10:41:23 JST 2012
Kouhei Sutou 2011-11-21 16:32:29 +0900 (Mon, 21 Nov 2011) New Revision: fd8f057986d2bac0e3ede7f575dbbef8e637f021 https://github.com/mroonga/mroonga/commit/fd8f057986d2bac0e3ede7f575dbbef8e637f021 Log: [truncate] define MRN_HANDLER_HAVE_TRUNCATE flag. refs #1151 The flag is for truncate available MySQL implementations. Modified files: ha_mroonga.cc ha_mroonga.h Modified: ha_mroonga.cc (+2 -2) =================================================================== --- ha_mroonga.cc 2011-11-21 13:31:30 +0900 (7ae1170) +++ ha_mroonga.cc 2011-11-21 16:32:29 +0900 (f4b6c5c) @@ -6650,7 +6650,7 @@ int ha_mroonga::delete_all_rows() DBUG_RETURN(error); } -#if MYSQL_VERSION_ID >= 50500 +#ifdef MRN_HANDLER_HAVE_TRUNCATE int ha_mroonga::wrapper_truncate() { int error = 0; @@ -6757,7 +6757,7 @@ err: DBUG_RETURN(error); } -#if MYSQL_VERSION_ID >= 50500 +#ifdef MRN_HANDLER_HAVE_TRUNCATE int ha_mroonga::truncate() { MRN_DBUG_ENTER_METHOD(); Modified: ha_mroonga.h (+8 -4) =================================================================== --- ha_mroonga.h 2011-11-21 13:31:30 +0900 (5b11fab) +++ ha_mroonga.h 2011-11-21 16:32:29 +0900 (6b68696) @@ -78,6 +78,10 @@ extern "C" { # define MRN_HANDLER_HAVE_MULTI_RANGE_READ_INFO_KEY_PARTS #endif +#if MYSQL_VERSION_ID >= 50500 +# define MRN_HANDLER_HAVE_TRUNCATE +#endif + #if MYSQL_VERSION_ID < 50600 typedef Item COND; #endif @@ -294,9 +298,9 @@ public: void start_bulk_insert(ha_rows rows); int end_bulk_insert(); int delete_all_rows(); -#if MYSQL_VERSION_ID >= 50500 +#ifdef MRN_HANDLER_HAVE_TRUNCATE int truncate(); -#endif +#endif // MRN_HANDLER_HAVE_TRUNCATE double scan_time(); double read_time(uint index, uint ranges, ha_rows rows); const key_map *keys_to_use_for_scanning(); @@ -594,9 +598,9 @@ private: #endif // MRN_HANDLER_HAVE_MULTI_RANGE_READ int wrapper_delete_all_rows(); int storage_delete_all_rows(); -#if MYSQL_VERSION_ID >= 50500 +#ifdef MRN_HANDLER_HAVE_TRUNCATE int wrapper_truncate(); -#endif +#endif // MRN_HANDLER_HAVE_TRUNCATE int wrapper_truncate_index(); int storage_truncate(); int storage_truncate_index(); -------------- next part -------------- HTML����������������������������...Download