1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MariaRocks: rocksdb.rocksdb fails with a duplicate key error

In MariaDB, Field::make_sort_key stores NULL-indicator byte for
the field.
In MySQL, it doesn't, so MyRocks stores the NULL-indicator itself.

Switch to using Field::sort_string, which is the same as
Field::make_sort_key in MySQL.
This commit is contained in:
Sergei Petrunia
2016-10-24 20:51:44 +00:00
parent 3ac33f8cdb
commit 1d1b10e93c

View File

@@ -741,7 +741,7 @@ void rdb_pack_with_make_sort_key(Rdb_field_packing *fpi, Field *field,
DBUG_ASSERT(*dst != nullptr); DBUG_ASSERT(*dst != nullptr);
const int max_len= fpi->m_max_image_len; const int max_len= fpi->m_max_image_len;
field->make_sort_key(*dst, max_len); field->sort_string(*dst, max_len);
*dst += max_len; *dst += max_len;
} }