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.
This commit is contained in:
Sergei Petrunia 2017-01-24 21:51:57 +03:00
parent 555b1b9f15
commit 13c7839ba7
2 changed files with 6 additions and 1 deletions

View File

@ -8721,13 +8721,13 @@ int Field_enum::store(longlong nr, bool unsigned_val)
double Field_enum::val_real(void)
{
ASSERT_COLUMN_MARKED_FOR_READ;
return (double) Field_enum::val_int();
}
longlong Field_enum::val_int(void)
{
ASSERT_COLUMN_MARKED_FOR_READ;
return read_lowendian(ptr, packlength);
}

View File

@ -749,7 +749,12 @@ void rdb_pack_with_make_sort_key(Rdb_field_packing* const fpi,
DBUG_ASSERT(*dst != nullptr);
const int max_len= fpi->m_max_image_len;
my_bitmap_map *old_map;
old_map= dbug_tmp_use_all_columns(field->table,
field->table->read_set);
field->sort_string(*dst, max_len);
dbug_tmp_restore_column_map(field->table->read_set, old_map);
*dst += max_len;
}