Skip to content

Commit

Permalink
fix(stonedb8.0): fix Tianmu engine for union primary key crash (#534)
Browse files Browse the repository at this point in the history
	details:
		if use the union primary query between two or more tables,
	the Tianmu engine may crash. because it do not init the bitmap of
	index field.
  • Loading branch information
DandreChen committed Sep 23, 2022
1 parent 124002c commit c5b05c1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions storage/tianmu/handler/tianmu_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1536,6 +1536,8 @@ void TianmuHandler::key_convert(const uchar *key, uint key_len, std::vector<uint
std::vector<std::string> records;
for (auto &i : cols) {
Field *f = field[i];
// stonedb8 init for union primary key
bitmap_set_bit(table->read_set, f->field_index());
size_t length;
if (f->is_null()) {
throw common::Exception("Priamry key part can not be NULL");
Expand Down

0 comments on commit c5b05c1

Please sign in to comment.