susumu.yata
null+****@clear*****
Tue Dec 16 10:41:29 JST 2014
susumu.yata 2014-11-06 19:10:41 +0900 (Thu, 06 Nov 2014) New Revision: f3f7cc15e27669351236d4979619be564a457965 https://github.com/groonga/grnxx/commit/f3f7cc15e27669351236d4979619be564a457965 Message: Check the range of row ID in Column<Bool>::unset(). Modified files: lib/grnxx/impl/column/scalar/bool.cpp Modified: lib/grnxx/impl/column/scalar/bool.cpp (+5 -3) =================================================================== --- lib/grnxx/impl/column/scalar/bool.cpp 2014-11-06 19:05:20 +0900 (8b3c6f0) +++ lib/grnxx/impl/column/scalar/bool.cpp 2014-11-06 19:10:41 +0900 (cf3b231) @@ -58,9 +58,11 @@ Int Column<Bool>::find_one(const Datum &datum) const { } void Column<Bool>::unset(Int row_id) { - size_t value_id = row_id.value(); - values_[value_id] = Bool::na(); - // TODO: Update indexes if exist. + Bool value = get(row_id); + if (!value.is_na()) { + values_[row_id.value()] = Bool::na(); + // TODO: Update indexes if exist. + } } void Column<Bool>::read(ArrayCRef<Record> records, -------------- next part -------------- HTML����������������������������... 下載