Kouhei Sutou
null+****@clear*****
Thu Oct 4 10:27:36 JST 2012
Kouhei Sutou 2011-08-12 12:01:41 +0900 (Fri, 12 Aug 2011) New Revision: 81db4ab0537d2674fa4265711861ce1e1f05f869 https://github.com/mroonga/mroonga/commit/81db4ab0537d2674fa4265711861ce1e1f05f869 Log: [mysql-5.6] follow ORDER direction change. refs #1046 Modified files: ha_mroonga.cc Modified: ha_mroonga.cc (+10 -2) =================================================================== --- ha_mroonga.cc 2011-08-12 11:56:30 +0900 (c6193ed) +++ ha_mroonga.cc 2011-08-12 12:01:41 +0900 (dcbfc87) @@ -83,6 +83,12 @@ extern pthread_mutex_t LOCK_open; # define mysql_mutex_unlock(mutex) pthread_mutex_unlock(mutex) #endif +#if MYSQL_VERSION_ID >= 50603 +# define MRN_ORDER_IS_ASC(order) ((order)->direction == ORDER::ORDER_ASC) +#else +# define MRN_ORDER_IS_ASC(order) ((order)->asc) +#endif + static const char *wrapper_index_column_name = "index"; #ifdef __cplusplus @@ -4816,10 +4822,12 @@ void ha_mroonga::check_fast_order_limit() col_field_index = field->field_index; } sort_keys[i].offset = 0; - if (order->asc) + if (MRN_ORDER_IS_ASC(order)) + { sort_keys[i].flags = GRN_TABLE_SORT_ASC; - else + } else { sort_keys[i].flags = GRN_TABLE_SORT_DESC; + } } grn_obj *index; if (i == 1 && col_field_index >= 0 && -------------- next part -------------- HTML����������������������������...다운로드