-
Notifications
You must be signed in to change notification settings - Fork 713
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation fault in myrocks::Rdb_string_reader::read #896
Comments
I think that the code don't check the record has ttl , if it is TTL record , the code don't skip 8 byte TTL value in unpack_record function. |
@LoveTommy Your fix is basically correct :) However, I'd probably put the check in mysql-5.6/storage/rocksdb/ha_rocksdb.cc Lines 6104 to 6112 in 65d61c9
The idea is that unpack_record should only care about unpack_info in the "value" that is passed in, and nothing else. |
Actually, I think this code was meant to skip the ttl bytes for secondary keys: mysql-5.6/storage/rocksdb/rdb_datadic.cc Lines 1420 to 1429 in 65d61c9
We just need to move populating |
@lth 👍 Your idea is better than me. According to your idea, I try this in Rdb_key_def::unpack_record : |
@LoveTommy Would you mind submitting a PR with that fix (with mtr test as well)? |
@lth and @LoveTommy I am already putting one together and testing right now with ^^ these exact changes and a test. |
#898 |
Reproducible at 414870a
Simple test case:
And the backtrace. It seems that nullptr is being passed into Rdb_key_def::unpack_field for the unp_reader from Rdb_key_def::unpack_record but Rdb_key_def::unpack_binary_or_utf8_varchar_space_pad is taking a hint from fpi->m_unpack_info_uses_two_bytes that there should be an unp_reader present.
The text was updated successfully, but these errors were encountered: