summaryrefslogtreecommitdiff
path: root/storage/maria/ma_write.c
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-11-06 09:40:39 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2018-11-06 09:40:39 +0200
commitdf563e0c037f9b2cdb22e145575f92a121b4b529 (patch)
tree31d39796cebcef916eb7e0888537c18f946170ff /storage/maria/ma_write.c
parente058a251c10350f3727ca1df022dc5786933535b (diff)
parentbdfe2784d5b73a1fdcdacb3d9adcc9dc71af344b (diff)
downloadmariadb-git-df563e0c037f9b2cdb22e145575f92a121b4b529.tar.gz
Merge 10.2 into 10.3
main.derived_cond_pushdown: Move all 10.3 tests to the end, trim trailing white space, and add an "End of 10.3 tests" marker. Add --sorted_result to tests where the ordering is not deterministic. main.win_percentile: Add --sorted_result to tests where the ordering is no longer deterministic.
Diffstat (limited to 'storage/maria/ma_write.c')
-rw-r--r--storage/maria/ma_write.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/storage/maria/ma_write.c b/storage/maria/ma_write.c
index cfa62ffec58..c2b521e3c02 100644
--- a/storage/maria/ma_write.c
+++ b/storage/maria/ma_write.c
@@ -669,13 +669,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);