Skip to content

Commit 13c7839

Browse files
committed
MariaRocks port: Fix for the previous cset (MariaRocks port: put back the assert)
- Put back the assert on SQL layer at the right location - Adjust rdb_pack_with_make_sort_key to work around the assert (like it is done at other palaces): MyRocks may need to pack a column value even when the column is not in the read set.
1 parent 555b1b9 commit 13c7839

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

sql/field.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8721,13 +8721,13 @@ int Field_enum::store(longlong nr, bool unsigned_val)
87218721

87228722
double Field_enum::val_real(void)
87238723
{
8724-
ASSERT_COLUMN_MARKED_FOR_READ;
87258724
return (double) Field_enum::val_int();
87268725
}
87278726

87288727

87298728
longlong Field_enum::val_int(void)
87308729
{
8730+
ASSERT_COLUMN_MARKED_FOR_READ;
87318731
return read_lowendian(ptr, packlength);
87328732
}
87338733

storage/rocksdb/rdb_datadic.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,12 @@ void rdb_pack_with_make_sort_key(Rdb_field_packing* const fpi,
749749
DBUG_ASSERT(*dst != nullptr);
750750

751751
const int max_len= fpi->m_max_image_len;
752+
my_bitmap_map *old_map;
753+
754+
old_map= dbug_tmp_use_all_columns(field->table,
755+
field->table->read_set);
752756
field->sort_string(*dst, max_len);
757+
dbug_tmp_restore_column_map(field->table->read_set, old_map);
753758
*dst += max_len;
754759
}
755760

0 commit comments

Comments
 (0)