diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-10-27 20:46:18 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-10-27 20:46:38 +0200 |
commit | 37ab7e45963627f3c1ea2dd43d5b305de37bb16f (patch) | |
tree | e07ada7fbde72c438f2a6a6c162e050caf1950f9 /storage/maria/ma_write.c | |
parent | 30c3d6db328d73f1b30be537aceb55d37936fdb9 (diff) | |
parent | 893ebb739e24637985892da1555f2e6f1a8ac5b6 (diff) | |
download | mariadb-git-37ab7e45963627f3c1ea2dd43d5b305de37bb16f.tar.gz |
Merge branch '5.5' into 10.0
Diffstat (limited to 'storage/maria/ma_write.c')
-rw-r--r-- | storage/maria/ma_write.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/storage/maria/ma_write.c b/storage/maria/ma_write.c index feac1dbf894..1cf8cc6af29 100644 --- a/storage/maria/ma_write.c +++ b/storage/maria/ma_write.c @@ -664,13 +664,18 @@ static int w_search(register MARIA_HA *info, uint32 comp_flag, MARIA_KEY *key, else { /* popular word. two-level tree. going down */ - my_off_t root=dup_key_pos; - keyinfo= &share->ft2_keyinfo; - get_key_full_length_rdonly(off, key); - key+=off; + my_off_t root= dup_key_pos; + MARIA_KEY subkey; + get_key_full_length_rdonly(off, key->data); + subkey.keyinfo= keyinfo= &share->ft2_keyinfo; + subkey.data= key->data + off; + subkey.data_length= key->data_length - off; + subkey.ref_length= key->ref_length; + subkey.flag= key->flag; + /* we'll modify key entry 'in vivo' */ keypos-= keyinfo->keylength + page.node; - error= _ma_ck_real_write_btree(info, key, &root, comp_flag); + error= _ma_ck_real_write_btree(info, &subkey, &root, comp_flag); _ma_dpointer(share, keypos+HA_FT_WLEN, root); subkeys--; /* should there be underflow protection ? */ DBUG_ASSERT(subkeys < 0); |