Kouhei Sutou
null+****@clear*****
Wed Mar 9 11:19:51 JST 2016
Kouhei Sutou 2016-03-09 11:19:51 +0900 (Wed, 09 Mar 2016) New Revision: 33bb693cb7a0af90863e6bf0f6bab081aa70fa30 https://github.com/groonga/groonga/commit/33bb693cb7a0af90863e6bf0f6bab081aa70fa30 Message: hash: fix a bug that entry size for large mode is small Modified files: lib/hash.c Modified: lib/hash.c (+5 -1) =================================================================== --- lib/hash.c 2016-03-09 11:14:33 +0900 (4ee3264) +++ lib/hash.c 2016-03-09 11:19:51 +0900 (a749116) @@ -1745,7 +1745,11 @@ grn_io_hash_calculate_entry_size(uint32_t key_size, uint32_t value_size, uint32_t flags) { if (flags & GRN_OBJ_KEY_VAR_SIZE) { - return (uintptr_t)((grn_io_hash_entry_normal *)0)->value + value_size; + if (flags & GRN_OBJ_KEY_LARGE) { + return (uintptr_t)((grn_io_hash_entry_large *)0)->value + value_size; + } else { + return (uintptr_t)((grn_io_hash_entry_normal *)0)->value + value_size; + } } else { if (key_size == sizeof(uint32_t)) { return (uintptr_t)((grn_plain_hash_entry *)0)->value + value_size; -------------- next part -------------- HTML����������������������������...下載