Skip to content

Commit 9d3442f

Browse files
spetruniaGunnar Kudrjavets
authored andcommitted
Issue mysql#22: SELECT ... FOR UPDATE takes a long time
- Specify the right column family when making a rocksdb::Get() call.
1 parent edd5b5d commit 9d3442f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

storage/rocksdb/ha_rocksdb.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2553,7 +2553,8 @@ int ha_rocksdb::rnd_next_with_direction(uchar *buf, bool move_forward)
25532553
bool found;
25542554
if (!trx->changes.Get(key, &retrieved_record, &found))
25552555
{
2556-
rocksdb::Status s= rdb->Get(options, key, &retrieved_record);
2556+
rocksdb::Status s= rdb->Get(options, pk_descr->get_cf(), key,
2557+
&retrieved_record);
25572558
found= !s.IsNotFound();
25582559
}
25592560

@@ -2774,7 +2775,8 @@ int ha_rocksdb::update_row(const uchar *old_data, uchar *new_data)
27742775
{
27752776
rocksdb::ReadOptions options;
27762777
/* Not setting options.snapshot, we need to check the real contents */
2777-
rocksdb::Status s= rdb->Get(options, key_slice, &retrieved_record);
2778+
rocksdb::Status s= rdb->Get(options, pk_descr->get_cf(), key_slice,
2779+
&retrieved_record);
27782780
found= !s.IsNotFound();
27792781
}
27802782

0 commit comments

Comments
 (0)